Refactor code that choose transport. Priorities between options were not handled correctly in the three contexts; commandline override, cmdinfo and megatest.config