python create json file from dict