Fix AttachmentModel::openAttachment
- Fix the logic to check for valid / invalid filenames.
- Put files in a unique temporary dir to avoid naming conflicts
when files are stored in the same directory multiple times.
- QTemporaryDir also creates the directory which the old code
did not.
- Use QUrl::fromLocalFile to construct a correct Windows file
URL.
Tested both with valid and invalid file names. A remaining issue
is that on Windows the temporary dir will be left around.
- GnuPG-Bug-Id: T6760