Add closing slash for path only if uri contains it.