Fix EZP-22055: A partial pathString loads a REST location/group

/content/locations/1/2 or /content/locations/124/4/54/2 would return
location 2. Anything but the actual path string will error out now.

Also applies to /user/groups.
Merge pull request #651 from ezsystems/fix/EZP-22055-REST_loadLocation_partial_pathString

Fix EZP-22055: A partial pathString will load a REST location