Fixed accidental global var in _readdir