Address pylint errors

This includes the new `unspecified-encoding` error which is recently introduced
for https://www.python.org/dev/peps/pep-0597/.

All text files are now opened in utf8 encoding, binary mode files do not need
any special treatment as they are treaded as byte streams, and in one case
we silence the warning since we are wrapping the open() call in a CAS API.
62 files changed