Use getdelim instead of getline as the ultimate goal is to read words

Add a main function with hardcoded file names to test the functionality
of dictionary generation.