Use mktemp to manage temporary path locations