s3cmd ignores the exit status of gpg, and ignores $TMPDIR when creating temporary files.
Patch to current svn
On download, the exit status of GPG is used. On upload, it's not. s3cmd 1.5.0 and some older releases use os.mkstemp() for temporary files, the correct behavior.