Update bywaf.py

updated the exception-handling function, 
can greatly ease black-box testing.