Properly namespace templates by mapping them to their sub-directories. Closes #458