Add functionality for extracting attachments during dir sync.