(FACT-134) Redo tests so the work on ruby 1.8.x

No String#encode or Encoding in ruby 1.8.x, update tests accordingly.