Working around some painful bugs in text renderering
Fixed TeX encoding issue and polished up text handling
Added rudimentary path support