Fix json by opening files not in binary mode.

Strings in JSON data could not be encoded/decoded, since the files were opened in binary mode.