saveParams function

Save a MizerParams object to file, and restore it