Fix parentKey transitions to root

Previously, deleting a key in `/dc1/kv/` would transition to
`/dc1/kv//` on success. A refresh at this stage would lead to `404`,
this commit will fix this and generate the correct route key in a
helper function.
Merge pull request #127 from tiwilliam/fix-cancel-transition

ui: Fix parentKey transitions to root on cancel