Use TMPDIR env var instead of /tmp for CURRENTPATH.