Added option for json-metamod to use STDIN.

Moved modify_json_metadata into library.