Improve detection of python executable

It might be possible that some people are using the system python rather than the one from Homebrew (I don't know exactly how `depends_on :python` works). So it's probably best to use `which python`, which should just return whichever python executable comes first on their path. This executable is then used to determine all the other python-related paths.