initial code clean up for experiment meta data.
Update store write to require only an experiment configuration
Extract commonf function to open or create a file into a helper method so it can be used anywhere.