Handle multiple files

Hi Kevin,

I have augmented the tool with support for batch processing and added a few basic tests to ensure we understand precisely what the tool is measuring. The tests are not comprehensive.

The json output is now in line with that produced by the javascript analysis tool used in [ecomp](https://github.com/fmtvp/ecomp). I have already put the binary in ecomp successfully and made the appropriate changes to support it there, pending merge upstream.