code: func GetTempDir(fs Fs, subPath string) string {
  	addSlash := func(p string) string {
  		if FilePathSeparator != p[len(p)-1:] {
  			p = p + FilePathSeparator
  		}
  		return p
  	}
  	dir := addSlash(os.TempDir())
  
  	if subPath != "" {
  		// preserve windows backslash :-(
  		if FilePathSeparator == "\\" {
  			subPath = strings.Replace(subPath, "\\", "____", -1)
  		}
  		dir = dir + UnicodeSanitize((subPath))
  		if FilePathSeparator == "\\" {
  			dir = strings.Replace(dir, "____", "\\", -1)
  		}
  
  		if exists, _ := Exists(fs, dir); exists {
  			return addSlash(dir)
  		}
  
  		err := fs.MkdirAll(dir, 0777)
  		if err != nil {
  			panic(err)
  		}
  		dir = addSlash(dir)
  	}
  	return dir
  }
docs: // GetTempDir returns the default temp directory with trailing slash
  // if subPath is not empty then it will be created recursively with mode 777 rwx rwx rwx