Revert saving in "r+" mode, use "w" instead

"r+" requires the file to already exist. Appending data to files is tricky and not terribly intuitive (what if data with the same names are already there?). I think "w" is better.