Added support for creating directories with options.