Adjusted url normalization to account for encoded characters and trailing slashes