pwkit/astutil.py: fix buggy exception path