python save json string to file