Fix replacing file name in headers upon save as

The code used a Scintilla-specific regex escape (\<) which doesn't work
anymore since the time we switched to full PCRE (which uses \b).  So,
update the regular expression to PCRE.

Also, properly escape the name to search in the unlikely case it has
regular expression escapes in it;  and properly check for word
boundaries even when not searching with an extension.
Increase the number of lines where filename is replaced upon save as

Search the first 4 lines (instead of 3) for Python templates support.