Blender Image Importer Script

Trying to create a file importer script for multiple images types. Code works correctly, but only allows me to load .txt files. See this thread for the code and some more info. http://blender.stackexchange.com/questions/53947/how-do-i-create-an-image-file-importer-script