Add bad response handling

Changes:
* Responses with a bad status now complete with completeError
* Added test for this
Merge pull request #6 from ajlai/add-error-response-handling

Add bad response handling