merged in more robust brew_install_or_upgrade. set mongo and redis to autoload