added -o option to specify output json file path
moved file write outside of class
Edits ecaldwell's PR for output to file
Merge pull request #1 from ecaldwell/master

Add output file parameter