Fix for issue #53

It was a bit of a slow day at the office so....

Added a function to check if ActiveRecord::RecordInvalid is defined
before using it in extract_exception_data.
Added matching specs