Switched to rapidjson. Simplified format of the generated json file. Renamed --allow-flip to --allow-rotate and its shortcut to -r. Fixed a couple of minor bugs. Modified docs to reflect changes.