If you're on Windows, put:
$FB::WINHACK_GPICAPPEND = 1;
in your etc/fbconfig.pl and let me know if it works. Looks like you'll need to make an $FB::HOME/tmp directory first that's writable by the webserver.
Mart --- what does POSIX::tmpname return on Windows? Isn't it a full path? How can you just append that to $FB::HOME/tmp without making a bunch of directories first? Can't you just do what jredburn suggested and prefix the single argument version of Write to use "jpeg:" or "gif:" to whatever POSIX::tmpname returns?
In any case, the code still works on Unix.
Unless I hear support for $WINHACK_GPICAPPEND it'll be removed. If it does work, though, then we should document it somewhere. (Somebody want to write a quick guide to running the server on Windows?)