This script will extract an attachment from an apple-mail email.
For more information, see my
blog entry
Select the document and hit submit: