Simplify prop load/save; truncate file before writing.
I noticed saving a property to an existing file would only overwrite and not truncate the file, leaving files with bogus data at the end.
While fixing this, I simplified the whole load/save code.
Edited by Martin Heistermann