Added check to see if brew exists

Otherwise Linux complains that 'brew' is not a valid command.