Update bywaf.py

changed exception handling to be Python3 compliant