Added preinstall check for brew under mac os x

quick and dirty fix of the preinstall script to enable installation for all users under mac os x using homebrew to install software.