Close tempfile after testing