Added check for successful Homebrew installation.
Fixed homebrew path setup.