Added rebuildXMLFile() to repair non-append xml in mods during patching