Hopefully this works in Py2.7

Moved the get-lines-from-file to a function where it can try different
approaches depending on version.  Only an issue because forcing UTF-8
prevents crashes when trying to merge files of different encodings...
Python2-compatible file encoding

I hope, anyway.  The important thing is that lines from files to merge
all have the same encoding, so I'm hoping that this will work.  Not
having Python 2 to check, I'd appreciate feedback!