change tpl conversion script to support Python 2.4
Merge pull request #14 from fermionic/20130105-smarty3

change tpl conversion script to support Python 2.4