Creates missing directories.