copyFile does not copy metadata
copyFile function fails to copy various metadata to do with a file.
(GHC 7.0.2, directory 18.104.22.168 - not that I expect it to matter.)
The cause is simple: Rather than calling an OS-specific "please copy this file" function, the directory package attempts to implement this logic itself. And does it completely wrong.
The fix should be easy; we just need somebody to figure out what the appropriate native OS function is on each platform.