fix potential illegal reference to 'move'
fix old_xml_import for python3
support import for *.gz files
explicitly set mode for GzipFile to 'rb'
fix text