Implement automatic creation of parent directories.