Correcting 'Invalid template exception' in Frontend.php

Seems to me there are some inconsistencies in 'theme' and 'themepath' variables stored in $app['path'] array. This patch repairs the case when *theme_path* config value points to a customized path but I'm not sure other parts of code isn't affected badly by this modification. I'm not sure at the moment what was your original idea about the two, 'theme' and 'themepath' indexed variables and how they are using properly. So please check out affected code chunks.
I found references at BaseExtension.php:281, BaseExtension.php:302