Handle 'status:fail' responses from PhantomJS land

When a server is not running at the specified host:port or
if there is a DNS failure, PhantomJS will respond with
status=fail, no response code, and a minimal HTML document.
We should not return that document, but throw an exception instead.
Merge pull request #473 from dholdren/master

Handle 'status: fail' responses from PhantomJS land instead of returning minimal HTML (i.e. "blank page")
access attributes

escape newlines, json doesnt like them
changelog for #447
Merge pull request #447 from JonRowe/access_node_attributes

Allow access to node attributes
accessing a nodes parents via ids
Merge pull request #448 from JonRowe/access_node_parents
Render full window size if document has no height

When rendering a screenshot with `:full => true` on a document which has
a height of zero, the call fails silently with no screenshot being
created.  This situation can occur with pages that use absolute or fixed
positioning for all content, for example.

Changed to use the `documentElement`'s `clientHeight` & `clientWidth` as
a fallback, which will result in screenshots the size of the viewport in
that case.