It was a problem before! That's why you never saw the '.' directory; you discarded it. Obviously, in the past you got the files from readdir ordered, with the '.' and '..' directories in front and that's not the case on RH (and shouldn't be depended on).