Create a tmp file to display 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.