Simplify test for fs.readdirSync.