BuiltinCore: gracefully handle existing lock on pidfile