Comments.
Cache stat objects for performance .
Normalize all path.join statements to / slashes.