Added file export/import as well as tests for these

You could just use `_json.writeValue(filename, b)`