Fixed error message parsing for recent versions of Rails.

Added support for error message parsing from 422 responses in more recent versions of Rails while maintaining backwards compatibility with older versions of Rails.

JSON responses from 422 errors in earlier versions of Rails:

```json
{"name":["can't be test","must be valid"]}
```

JSON responses from 422 errors in recent versions of Rails:

```json
{"errors":{"name":["can't be test","must be valid"]}}
```

This fixes issue #567.