Fix incorrect path indexing for greedy routes.

Greedy routes should be indexed without the trailing /. Failing to do
that makes paths without trailing arguments fail.

Fixes #3943
Merge pull request #3946 from cakephp/issue-3943

Fix incorrect path indexing for greedy routes.