Dari et al fixes
Fixed survey bug, highlighted by the smoke tests.
Cleanup, modernise
Ensure we don't bust filename length limiti when saving email attachments
Also convert unicode filenames to ascii (store doesn't handle unicode
filenames)