Fix handling of RestClient XML error responses

Resolves #38.