Fix invalid temporary path on Windows

`uniqPathName` may have invalid path characters on non-POSIX file path.
(e.g. "c:\Users\foo" -> "ghc-modc:\Users\foo")
This patch will fix it.