Throw parsing error at two places could crash by 'undefined' var

This patch should fix the crashes in issue [#81](https://github.com/jindw/xmldom/issues/81)

Corresponding tests added also