Support non-default PORTSDIR variable.
Use the less-whiny 'whence' over 'which'.

This is a zsh features, but this is a zshrc script!