Moved the actual functionality of the commandline/Main class to a method that throws exceptions, and changed the main method to respond to those exceptions.  Cleaned up logging
Merge pull request #259 from stevesaliman/master

Enhancing Main.java to help other programs call it