initial  S_ISDIR trick
Merge pull request #2 from robertzk/S_ISDIR

initial  S_ISDIR trick