Create tmp file to display a fatal error in dialog

When working with the dialog-based version of the program and a fatal
error occurs, create a temporary log file and put the full output of the
program there. This makes it easier for the user to determine what went
wrong.