If you want to make changes to files, you might want to check that the entry that readdir returned is in fact a file (see "-f"). This will have the side-effect of ignoring "." and ".." as those are directories. readdir will show all entries in the directory (files, directories, named-pipes, ...)
Speaking of dot-files, in unix (and others), files whose names begin with a "." are considered to be "hidden" and, by default, most programs won't show them. Since readdir shows you everything (like you get from ls -a), you get to ignore them yourself in your code.