How to show file extensions in finder for all files
Most likely the files you are wondering about do not have any extension associated with them. Unlike Windows and many other operating systems Mac OS does not require a file extension and can use meta data stored in the filesystem instead.

More about Resource Fork and File Type/Creator.

After some searching around it appears to be fairly complicated to take information from the meta data and use that to add extension to files.