extract error handling for testability
some more helpful help output when command line parsing fails, addresses climate/issues/13