Fix sml/get-directory for files attached to mails.
Fix sml/get-directory for files attached to mails.

Credits to tsdh.