linkOrCopy function

Create link to file, falling back to making a copy if linking fails.