Use TMPDIR to set the base compile directory

The compile scripts use `mktemp` to create temporary directories that house
the cache, buildpack, etc., and that command relies on this env var for the
base directory.