CLI: working commandline

With a few tests. '--help' is very minimal.

Removed unused mkdirp and added 'optimist' for cli option parsing.