Test that the the file does not exist already.
In case we call link() on a file system where link() fails (and not with EEXIST), we use would use an already existing file with the same name. This commit makes sure we try a new file name in that case.