update TMPDIR and check for euid