Fixes #190.  Corrects issue where directories are not created before attempting to write media files.
Merge pull request #196 from pencilblue/issue/PB190

Fixes #190.  Corrects issue where directories are not created before att...