Add assertion to ensure the file extension

This patch adds an assertion in the process of
checking templates to be sure a good file extension
is used.

Change-Id: I694ca05729358943c6a5d950b6ebf6f07b977fcb
Merge "Add assertion to ensure the file extension"