Fixing double encoding of attachments saved in relative path

When saving attachments in the relative path, the path is double encoded and the file cannot be found again.
This fixes this bug