Fixed typo when loading themed icons with file extension and added debug messages

This should finally fix issue #18