I made the attached patch to support the TMPDIR, TMP and TEMP environment variables. When none of these are set, the programme still writes to '/tmp', otherwise to the location pointed to by the first of the variables that is set.
Also, with this patch the directory created is now called 'comix-<username>', to support more than one user running Comix at the same time.
Finally, I made some minor, and probably pointless, changes to the code actually creating the directories.
Hope you find some of this useful