Handle tmpdir