os: Properly report failure to link lock file

Stop assuming that a failure to link always means that the file indeed
exists. In case of other failure (e.g., permissions), the user would get an
inconsistent "Can't read lock file" message.

Signed-off-by: Olivier Certner <olce.freedesktop@certner.fr>
4 jobs for issue-1139 in 3 minutes and 16 seconds (queued for 2 seconds)
Status Job ID Name Coverage
  Docker Image
passed #7321845
debian-buster

00:00:09

 
  Build And Test
passed #7321846
autotools

00:03:06

passed #7321847
meson

00:01:59

passed #7321848
meson-noglamor

00:01:41