Decode both files with utf-8-sig so a BOM from a Windows editor no longer
blocks the gamelist parse or hides the Pegasus collection header. Parse
gamelist.xml with comments and processing instructions retained so they
are written back. Keep a second <game> whose path shares a filename with
an earlier one as an unmanaged entry instead of overwriting it. Index a
Pegasus block by the top folder of each listed file as well, so a block
listing the discs of a game folder merges into RomM's multi-file entry.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>