Fix dirswitch to work with both zsh and bash.