Use precmd hook for updating OS X proxy icon

Using the chpwd hook function causes some junk to be printed to STDOUT after
returning from a subshell wherein the working directory was changed. In rare
cases, this can cause issues with 3rd party tools. An example is this issue
with the Python virtualenvwrapper tool:

https://bitbucket.org/dhellmann/virtualenvwrapper/issue/216/lsvirtualenv-and-workon-output-broken-in
Merge pull request #2275 from wjv/wjv

Use precmd hook instead of chpwd for updating OS X proxy icon