You might want to use sys_get_temp_dir() as windows won't have /tmp.