When resoling url, make sure that the last / is removed only when necessary
Merge pull request #1 from IRI-Research/master

correct url resolve on click