Add dry run functionality

This was more complex that expected. A bug in optimist means we have to
parse out the booleans ourselves, and then use them throughout.
Refactored a couple of methods to make this easier and clearer.
remove optimist
Merge pull request #56 from jackfranklin/dryru

Dry Runs (Closes #40)