Fixed tmp dir creation (race condition)