fix tests with ruby 1.9. compare byte contents.