Nokogiri branch rebased

Here's a cleaner pull request for the Hpricot => Nokogiri replacement.