Fix parentKey transitions to root on cancel

Fix for small bug from previous commits.

Deleting a key in `/dc1/kv/` would transition to `/dc1/kv//` on success. A refresh at this stage would lead to `404`, this PR will fix this and generate the correct route key in a helper function.