Class fix: patched readdir and stat functions