Allow slashes at the end of URIs

Fixes bug #152.