Portable temporary file and directory support for Windows and Unix, based on code from Cabal