fix TMPDIR path in mkdtemp
fix TMPDIR path in mkdtemp

Before:  path = ".../T//DependencyResolution_External_Complex.XXXXXX"
Now:  path = ".../T/DependencyResolution_External_Complex.XXXXXX"

add `/` to path if necessary

use hasSuffix

abertelrud/swift-package-manager,apple/swift-package-manager,vmanot/swift-package-manager,apple/swift-package-manager,JGiola/swift-package-manager,haskellswift/swift-package-manager,apple/swift-package-manager,abertelrud/swift-package-manager,vmanot/swift-package-manager,JGiola/swift-package-manager,rsmoz/swift-package-manager,abertelrud/swift-package-manager,apple/swift-package-manager,abertelrud/swift-package-manager,apple/swift-package-manager,mxcl/swift-package-manager,JGiola/swift-package-manager,vmanot/swift-package-manager,haskellswift/swift-package-manager,sschiau/swift-package-manager,sschiau/swift-package-manager,haskellswift/swift-package-manager,JGiola/swift-package-manager,mxcl/swift-package-manager,sschiau/swift-package-manager,vmanot/swift-package-manager,vmanot/swift-package-manager,sschiau/swift-package-manager,mxcl/swift-package-manager,sschiau/swift-package-manager,haskellswift/swift-package-manager,mxcl/swift-package-manager,rsmoz/swift-package-manager,abertelrud/swift-package-manager,JGiola/swift-package-manager