Fixed reading of text file contents to not assume UTF-8 encoding.

This shows itslf with Python 3 under Windows where it usually isn't the
default file I/O encoding.