Back to autocommit, but using a Queue to hold the attachments and wait to make sure all the file have been saved before returning.

Sources:
http://www.ibm.com/developerworks/aix/library/au-threadingpython/index.html
http://pymotw.com/2/Queue/index.html#module-Queue

This reverts commit e1fe4eb522ab1b28223c6c8610ff31cc735839f3.