Userprefs saving and test
Save prefs file, lots of tests
Fixes from merge
Merge pull request #10 from ryandoherty/userprefs

Userprefs save functionality