Ensure that all directories are created if they not yet exist.