registry: make normalize_reg_path() strip leading and trailing '/' chars.