Fail more gracefully if there's a option-parsing error

Don't call config.logger before it is set
There is no method STDERR::debug, use Logger::debug instead
Merge pull request #12 from vasi/parse-error

Partial cleanup of lib/cli.rb