renameFile now consistently reports an error if the destination is a directory, as specified by documentation.

Previously the exceptions raised would be quite inconsistent. For example,
given a file 'f' and a directory 'd', on Linux, the simple case worked:

Prelude System.Directory> renameFile "f" "d"
*** Exception: f: rename: inappropriate type (Is a directory)

however:

Prelude System.Directory> renameFile "f" "d/"
*** Exception: f: rename: inappropriate type (Not a directory)
Prelude System.Directory> renameFile "f" "."
*** Exception: e: rename: resource busy (Device or resource busy)
Prelude System.Directory> renameFile "f" "/tmp"
*** Exception: e: rename: unsatisified constraints (Directory not empty)

Windows was inconsistent with the documentation even in the general case:

Prelude System.Directory> renameFile "f" "d"
*** Exception: f: MoveFileEx "f" "d": permission denied (Access is denied.)

The additional check should not incur noticeable cost as an extra stat
to check for a directory is only performed in case of an IO exception.

I am not sure if this is actually the right abstraction level to fix
these inconsistencies. Perhaps they should be pushed down to libraries/Win32,
but the thing is, the Win32 documentation does not try to specify which
errors are raised in which settings, but System.Directory does, and the
implementation goes against the documentation, which seems wrong.