Correct emails when folders are shared.

itemType is never "dir"; it's either "file" or "folder".
Merge pull request #2320 from ceri/master

Fix erroneous email when folders are shared