Fix bug in EmailTemplate::lookupByName
Merge pull request #610 from greezybacon/issue/610

DB Error #1064 / Template Fetch Error

Reviewed-With: Peter Rotich <peter@osticket.com>