Use TMPDIR env var instead of /tmp for CURRENTPATH.

Resolves #8