def build_path_to(script_name = nil, *args)
    args.compact!
    query = args.pop if args.last.kind_of?(Hash)
    path  = map_path_to(script_name, *args)
    path << "?" << Rack::Utils::build_query(query) if query
    path
  end
def build_path_to(script_name = nil, *args)
    args.compact!
    query = args.pop if args.last.kind_of?(Hash)
    path  = map_path_to(script_name, *args)
    path << "?" << Rack::Utils::build_query(query) if query
    path
  end
Returns URL path with query instructions.
 This method has been extracted from
 http://wiki.github.com/sinatra/sinatra/howto-generate-links.