Ensure Directories exist prior to writing to them.