save/load dictionary to/from localStorage