Homebrew pwd

Two of the three commits from gh-574. Very minor modifications to the homebrew hudson script to be a bit more robust.

/cc @sbesson