Add a second output argument to CheckPath nonzero iff the routine creates a new directory.
Fixed bug.