Create our temporary file in $TMPDIR, if the environment variable
is set. /tmp otherwise.

Submitted by:   Dan McGregor <danismostlikely@gmail.com>