fixed RouteApi vars

-vars wasn't returning subtree path parts
-vars wouldn't return a dynamic path part if
it was the last part of the url