Cmdline refactor and test coverage.

Refactored the cmdline component, including fixing some issues. Removed
System exits from outside of main, replaced with an unchecked exception
to facilitate testing. Fixed issue where providing the -h flag for a
command didn't actually do anything. Added unit test support for the
cmdline component. Fixed .empty files to remove references to hub
internals.