Corrects mistake with returning new path.

Previously the new path would have been incorrect for routes containing
wildcards unless the length of the part of the path that matches the
wildcard was 1.
Documents `beagle`.