primDirExist(): work around MSVCRT oddity where stat() returns error when given directory names that end with a path separator, i.e., "foo/" isn't OK (but "foo" and "foo/." is).
primDirExist(): work around MSVCRT oddity where stat() returns
error when given directory names that end with a path separator,
i.e., "foo/" isn't OK (but "foo" and "foo/." is).

FranklinChen/Hugs,FranklinChen/Hugs,FranklinChen/Hugs,FranklinChen/Hugs,FranklinChen/Hugs,FranklinChen/Hugs,FranklinChen/Hugs