allow empty attachments and images.

When having empty image or attachment files, saving fails - this is an ad-hock fix.