Changed it to pick up P_tmpdir instead of hard-coding "/tmp".