Bug corrections

* Corrections on MacOSX with mktemp
* Update parser to support DTD entities
* Update parser to support multiline tags
* Reformat output