Preliminary image writing support for UNIX

Lots of cosmetic fixes needed (setting widgets enabled/disabled and
whatnot). Probably too little sanity checking too.