Homebrew/homebrew — pull request #33042 by soarpenguin (2014-10-09 04:22:07+00:00)
Title: fix bug when run 'bash -x brew' under dir where brew script in.

just like brew script in ~/homebrew/bin, run $cd ~/homebrew/bin && bash -x brew or sh brew,
then ${0%/*} get wrong path.