ssh: spec: make sure tempfile release the file before we try to use it