Handle fragment-only URIs correctly.

Fixes issue #111.