Writing out the synonyms dict to JSON.