If the operator has to select a directory on disk, the FileSelectPopup or DirSelectPopup functions can help him to do this. Via these functions is also possible to create a directory, regardless of the state of the "Allow make directory" parameter (right click in the file list and choose New >> Folder).
On the other hand, if you have a pathname and you want to be sure that all directories exist, you can first use the SetDir with the full pathname and if it fails, recursively go back one directory at a time in the pathname (SplitPath + SetDir) until you find an existing directory and then create all the necessary directories to build the full pathname you need using the MakeDir function in the Utility library.