refactored escape character unit tests

 to include proper assertions for UTF16 values. Also added checks for validity of TextNode where it is needed

@RickEyre  @rillian  @caitp  can you guys please verify this PR and give feedback if any.

**Edit**
Fixes issue #75