But if you are already working in a Terminal window in the directory where you want to save the attachment, type 'cp ' (note the space), then drag the attachment to the Terminal window and drop it there. Finally, type a period. When you're done, your Terminal window will look something like this:
cp /private/var/tmp/folders.501/TemporaryItems
/com.apple.mail.drag-T0x40a280.tmp.1L2mdM/filename.txt .
Press Return and, voila!, your attachment is copied.
[robg adds: I broke the Terminal line for a narrower display; there won't be a line break when you actually do it.]

