python write json to file encoding