Strip extra slashes from URI so that they still match later on.