remove the redundant file seperator in temp directory string