adding temp directory parameter feature

Hi people!

I wold like to choose the temp directory, this features is complete and tested!

Thanks!