Fixed creation of directories.