fixing issue #1768: copy module can't overwrite/replace read-only files ...

..., As recommended checking the destination directory is writable,(Still making sure its readable) then creating a hardlink and doing an atomic replace