Array casting optimization and RSpec updates.
Stringify encoding when passing to nokogiri.