Fix for issue #53

Added a function to check that ActiveRecord::RecordInvalid is defined
before trying to use it as a class name.
Added matching specs