Removes template from python string.

Tested in the same folder and with a changed template in another
folder. In both cases it worked as expected.