Remedy for delay caused by temp files triggering magit-refresh

I'm having quite nasty lag because of temp files created for syntax checking which trigger magit-refresh like crazy.

I try to resolve that here with a list of files that the callback should ignore. Do you think that this could be merged?