Fix double encoding of attachments stored in relative path