Style-nit: File.createTempFile() should be sufficient since we already import java.io.File here.  And we prefer spaces around operators like +.

Finally, should we use "._" instead as the prefix?  That way the temporary file is hidden from view when a user is doing `ls` at the same time as a checkout is occurring?