refs.c: do not die if locking fails in `write_pseudoref()`