Avoid using internal path_query method.

Fixes #49

`path_query` is an `URI::Generic` internal method, which has been removed in Ruby head.

cc @zzak @rafaelfranca