Fix tmpdir teardown