urlquote paths when checking if correct URL was used

Otherwise the check fails when using unicode slugs.