Add feature '--output file' CLI option

This request has two changes.

1) It moves the OptParser logic into it's own method so that it can be tested.
2) It adds support for a command line option "--output file" to specify an alternate output file.

Tests included. Readme updated.

Thanks!