I don't think this is the right way to go about this. You can't override the core kernel php files in an extension. The best way to achieve what you're trying to do would be to create a new template operator, say mywash, build that into an extension, and then use it in your templates. There is a wizard to help you waiting (hidden!) in your admin site, e.g...