Leave alone fragment-only URLs.

Without this change, mangling such URLs produces invalid results.
Merge pull request #359 from jscheid/leave-alone-fragment-only-urls

Leave alone fragment-only URLs.