Fixed conformance to CommonJS filesystem/A module in fs.directory()