Added an S_ISDIR check before opendir() to work on hfsplus volumes (?)