Update tbtools.py to handle non-ascii files

When reading a non-ascii source file, a UnicodeDecodeError exception may occur. It's better to assume the file is UTF-8 instead of ASCII.