CLI: working commandline

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

Removed unused mkdirp and added 'optimist' for cli option parsing.
exists() check new location first

So we don't get a deprecation warning.