Revert "Remove an unnecessary 'createDirectoryIfMissing' call."

This call turned out to be neccesary after all.

This reverts commit a46df9dbfe14df0df60c8cc401221c4128ad675e.