editstate: Reopen temp file rather than rereading.

Some editors are replacing the temp file with a different file with the
same name. Thus, rather than seeking to the beginning of the file and
reading we need to reopen it.
Also consider XDG_RUNTIME_DIR as a temp directory.
Don't crash if closed during account creation.