[backend] link_or_copy: unlink the target before linking

Otherwise the code will truncate the file in the cache
if the link already exists for whatever reason.