Fix in test: get temporary directory by sys_get_temp_dir()