an utility script to list the extensions of the files in a directory