Removed '?' wildchar (if ends with) when reversing the route.

Minor fix:
Curretly, getReverseRoute() includes the wild character '?' when reversing a route which ends with '?' (/?, for eg) and this PR fixes that trailing char.

Thanks
Sojin