Various formula cleanup.

Also added bash/zsh completion directory functions.

Pushing for review just in case anyone really objects to any of this.