Rename a local var, check for a JSON error

Rename rv in Client.getPage, which represents the revisions object in the
JSON response from the API, to revs to improve clarity.

Add a check for bad JSON content, also in getPage.