make container dirs before trying to write the file.