Shorten path: fix escaping on both bash and zsh

Thanks to polyphemus (Rolf Morel) for the catch!