Isabelle uses `/tmp` no matter what on Unix platforms, apparently
because using an arbitrary `$TMPDIR` can cause "path too long" errors on
macOS (https://isabelle.in.tum.de/repos/isabelle/rev/ff92d6edff2c).
However, when not using the sandbox (i.e. on Darwin), this causes the
build to fail if its temp directory (`/tmp/isabelle-`) has already been
created by a previous build using a different build user. For example,
this is the cause of https://hydra.nixos.org/build/321069301.
So, this PR changes it to use `$TMPDIR` during the build of Isabelle
itself (but still use `/tmp` when using Isabelle normally). I had
initially hoped this would also enable Isabelle to build within the
Darwin sandbox, but something else seems to be wrong (I get an opaque
`I/O error: Operation not permitted`).