Is there a way to make saveAttachmentToFolder() not return until it's
done downloading the message?

Or what would be the best approach to serializing this? I need the
files to be on the file system before I fux with them.. my extension
currently works, but only if the attachment is cached.