makepath - create intermediate directories for a path
char *makepath(path, refpath, trace, showerrs);
char *path, *refpath;
int trace, showerrs;
Makepath creates any directories missing in path. If refpath is
non-null, then it must have a non-null trailing subpath that is
common to path. The entire path will be created if refpath is
given and refpath is the path of a directory, otherwise only the
components preceding the final component will be created for path.
If trace is non-zero,
diagnostics will be printed to stderr. If
showerrs is non-zero error messages will be printed to stderr.
Makepath return 0 if successful, 1 otherwise.
makepath("/foo/bar/baz", NULL, 1, 1);
will attempt create
"/foo" and "/foo/bar", if they do not
printing out changes as they are made and errors, if they occur.