Adds UTF-8 encoding to getBytes for html in TOC generation

getBytes was called without an encoding specification, garbling non-ASCII
characters that have not been encoded in the html source file. Fixes #24