Added dumping tracebacks to a text file

when an error is encountered and no high-level error handling code is
initialized, write the traceback to a file and open it in a
system-specific text editor.