Switched to S_ISDIR for portable check if filesystem entry is directory. Automatically remove trailing slashes from path.
Merge pull request #6 from shearl/master

Switched to S_ISDIR for portable check if filesystem entry is directory....