Changed template directory to be dynamically looked up. Change-Id: I89b96581e842574e1c7ad36e8633d3e787f488c2