Make temp dir in TMPDIR, not in working dir
Don't rely on fancy tricks for variable substitution