Fix extract.rb and mime_info_magic.rb to work on Ruby 1.9+