open the file in text mode
Merge pull request #15 from mgax/py3

Python 3 compatibility