Improve traceback reports in handleException and scriptexe fixes