pyflakes: fix crash from PYTHONPATH additions
* also added logging of pyflakes stderr messages

(integrated from trunk branch change 8c92fa5 by Todd Whiteman <toddw@activestate.com>)