Fix 1.9 compatability issue in DatasetBuilder.
Fix Rspec deprecation warnings.