Issue 11434: std.file.copy doesn't preserve file attributes (eg: executable mode etc)

This is my attempt to address pull request https://github.com/D-Programming-Language/phobos/pull/1747