Fixes a problem when there is more than one 'templates' occurrence in path
Merge pull request #2 from serkanyersen/master

fix problem when there is more than one 'templates' in file path