builtin-remote: make rm operation safer in mirrored repository