Styling and error handling.

I fixed some stylistic things relating to single line if statements.

I moved some of the checks to the JS side of the house. Because we need
to pass NULL to xmlCreateIntSubset for the last two params for them to
be ignored, we have to do some checks in the C++ side. In order to deal
with this I used strdup to grab the content of the v8::String.

Signed-off-by: Nick Campbell <nicholas.j.campbell@gmail.com>