Added another test case to fix the case when a template ends with a single '$' character.  This is invalid and
should throw an exception.