Fix issue of duplicated strings not wrapped with T()

1. added code to separate the interpolation/templated book keeping
2. added more tests around making sure that files with various
   duplicated strings are correctly rewritten

[Finishes github issue #6]