renameFile now consistently reports an error if the destination is a directory

I only tested on Windows, could you please run the tests on Unix to make sure they are not broken?

https://ghc.haskell.org/trac/ghc/ticket/8482 is related.