||FilePath -> FilePath -> IO ()
renameDirectory old new changes the name of an existing directory from old to new. If the new directory already exists, it is atomically
replaced by the old directory. If the new directory is neither the old directory nor an alias of the old directory, it is
removed as if by removeDirectory. A conformant implementation need not support renaming directories in all situations (for instance, renaming to an existing
directory, or across different physical devices), but the constraints must be documented.
main = do createDirectory "/tmp/BAR"
a <- doesDirectoryExist "/tmp/BAR"
renameDirectory "/tmp/BAR" "/tmp/FOO"
b <- doesDirectoryExist "/tmp/BAR"
c <- doesDirectoryExist "/tmp/FOO"