don't unlink tmpfile early

Nice as it is to not have a temporary file lingering in the case of a
crash, it proved too confusing.