Don't clobber alternate file when writing tempfile

Without this the alternate file gets replaced by an empty temporary file, which is quite annoying.