I've got attachment encoding working (i.e. not corrupting the image or zip) by hacking together a solution using the mpack command.
All of the various Tcl flavors or base64::encode or ns_uuencode I was able to setup (including adding the tclTrf package to AOLserver) resulted in the same sort of corruption, so that's why I went with mpack. It just worked by creating a legit MIME which I then pulled apart and only grabbed what I wanted.
After things calm down on my current project and I have a chance to setup a dev environment for OpenACS HEAD, I'll try to post the details of how I got it working with PG here. Email me if you need advice before then.