Fix undefined local variable or method `klass'

klass and id were not defined when deserializing ruby objects, causing an undefined error when trying to raise a DeserializationError. This should be fixed now.
Merge pull request #733 from neilgupta/undefined_klass

Fix undefined local variable or method `klass'