Replace '/' by '-' in filenames of attachments

Fixes #2537