Fixes for python3

- Output file must be opened binary mode for ET.
- There is no basestring class in python3.
Merge pull request #1 from choppsv1/python3_fixes

Fixes for python3