I think the "/tmp" directory shouldn't be hardcoded as it could have different names on different systems.
/tmp is defined by FHS and POSIX, if it's not there... something is wrong.