Bug fix for detecting non existing template folder

Change-Id: I19af6fcaba3a9ce09215d9ccdde7f921dbe2f798