Fixed export to include any dedup id as intended and made sure the exported records don't include the XML prolog.