adding a function to get best temporary directory path