Adding parameter to set different tmp directory

Adding parameter to set different tmp directory