Use /tmp when $TMPDIR is not set in run-tests.sh
Merge review 441 by @jdoliner