Add a possibility to specify the temporary folder

This pull-request adds a new feature for use your own temporary folder. In my project, i can't use "/tmp" return by "sys_get_temp_dir()"  and i can't change this folder because i'm on PHP 5.4