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>
5 jobs for issue-1131 in 5 minutes and 58 seconds (queued for 3 seconds)
Status Name Job ID Coverage
  Docker Image
passed debian-buster #11285541

00:00:24

 
  Build And Test
passed autotools #11285542

00:05:34

passed meson #11285543

00:02:16

passed meson-noglamor #11285544

00:01:48

passed mingw-cross-build #11285545

00:00:45