Improved uri parser with strings that end with //