configstore: use O_TRUNC when rewriting jenv file 

Fixes LP #1348458

Because thumper was determined not to write a temporary file then move it, we have to ensure that iff we rewrite the .jenv file, the contents of the existing file are truncated before writing to prevent future readers of the file seeing corrupt data at the end of the file.