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

...empting to write media files.