Fix parentKey transitions to root on cancel

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