localize.py: small fixes to skip false positives with the new gargoyle_header_footer & not include trailing comments when doing substitution