TextMate 2 changed files' icon?
What you are seeing are QuickLook preview thumbnails: if you look closely at your screenshot, you will notice each “icon” shows the start of the file’s content. You are correct this is due to you installing TextMate 2, which provides a powerful QuickLook extension for source code files (try selecting one of the files in Finder and hitting space). The original file icon is unchanged by this, hence the fact it appears in “Get Info”. 

As to the fact some files still display the original file icon: in my observation, there seems to be a bug in Yosemite’s Finder’s way of handling QuickLook thumbnail generation – some files will be missed at times.

If you want to disable TextMate’s QuickLook plug-in, this answer should help.