improve distutils behavior in brewed Python

Previously we relied on a distutils.cfg to change the install location
of scripts, but that interfered with many standard setup.py options,
such as --prefix. Switch to using the same technique system Python
uses, for more consistent results.