def fetch_path(uri, mtime = nil, head = false)
    uri = URI.parse uri unless URI::Generic === uri

    raise ArgumentError, "bad uri: #{uri}" unless uri
    raise ArgumentError, "uri scheme is invalid: #{uri.scheme.inspect}" unless
      uri.scheme

    data = send "fetch_#{uri.scheme}", uri, mtime, head
    data = Gem.gunzip data if data and not head and uri.to_s =~ /gz$/
    data
  rescue FetchError
    raise
  rescue Timeout::Error
    raise FetchError.new('timed out', uri.to_s)
  rescue IOError, SocketError, SystemCallError => e
    raise FetchError.new("#{e.class}: #{e}", uri.to_s)
  end
#
Downloads +uri+ and returns it as a String.