Add #getPath to mirror #getHash.

Rather than pass a "force" option to #getFragment, just
extract to a separate method.