Made some changes to make site_scons/site_tools/pyext.py more robust