Update localize.rb to Ruby 2.0

Add require 'yaml' because it is needed by Ruby >=2.0