Reapplied the to_xml_file fix to permit cuckoo-maec output