Process .m and .h files, improve regex

The regex was previously matching any character followed by the file name, eg aarb.exe. This fixes it to match a . character, one of the file names, an optional non-alphanumeric character (this covers a quotation mark for directories with spaces like you find in xcode projects) and the end of the line.