Fix detect tmp path