Fixed issues with copy link function when target link is actually a file and src is just a folder.