Check $ENV{TMPDIR} before other paths
use File::Temp for randomized tempdir