MAGE-6659: Transactional Emails logo feature interacts incorrectly with Database as media storage

When Database is choosen as a media storage, Transactional Emails logo will not work in some special cases. 

*Preconditions:* 
Database is configured as a media storage (System - Configuration - System - Storage Configuration for Media) 

*Steps to reproduce:* 
1. Log in to backend 
2. Go to System - Configuration 
3. At Design tab open the Transactional Emails fieldset 
4. Upload any custom image and save configuration 
5. Delete the contents of /media/email/logo folder 
(this should not influence the system behavior, because DB is media storage) 
6. Execute any action, which triggers the email to be sent (for example, register a customer's account) 

*Actual result:* 
Email cames with default logo 

*Expected result:* 
System should take the image from DB (resync this file to filesystem), and sent email with custom logo