Support Python 2

These changes support Python 2 while maintaining Python 3 support. See the Travis CI test [results](https://travis-ci.org/myint/massedit/builds/7874876).

I also set the UTF-8 encoding in a more portable way.