fix for handling IRIs

This pull requests correspond to the following issue.
https://github.com/cygri/pubby/issues/9