Test all the CLI Modules!

More work towards testing the CLI modules. I believe there's more work to be done, but I might as well put the pull request up for visibility.

New CLI Tests:
 * Config
 * DNS
 * globalip

This also includes fixes for bugs that were discovered when writing the tests.
TODO: Detail each bug fix