// md: target should be a series of blank-delimited directories to be created
//     If an element is a whildcard, the directory will always be created,
//     using mkdir -p.
//
//     uses: run()

void md(string target)
{
    int idx;
    list paths;
    string dir;

    if (!exists(target))
        run("mkdir -p " + target);
    else if (((int)stat(target)[0] & S_IFDIR) == 0)
    {
        printf(target + " exists, but is not a directory\n");
        exit(1);
    }
}





