Improved detection of the PYTHONPATH.