int existDirectory(path)
char *path;
{
  struct stat buf;

  if ((stat(path, &buf) == 0) && S_ISDIR(buf.st_mode))
    return(1);
  return(0);
}

