fix issue where trailing slash is removed for star segments

For a route specified as 

    /*everything

a URL of 

    folder1/folder2/folder3/

would return 

    params: { everything: "folder1/folder2/folder3" }

which is missing the trailing `/`. I was expecting the URL section matched to the star segment would be unmodified.

This PR checks if a star segment is present and if a slash was removed and will add the trailing slash back to the path.