Added set_temp_dir method

Added set_temp_dir method for setting temporary directory