Fix the util method used to create temp dir