craftsd can now be more easily unit tested.

The command line parameter handling has been moved out of the main
function in order to simplify unit testing.
Added Travis CI configuration