[eluser]CroNiX[/eluser]
I'd steer clear of extremely common names that CI uses like "config", seeing as how CI uses a lot of things named "config" which is probably why you had a problem. Just like I wouldn't name a controller, "controller". Be creative with your names. 'template_config.php' or something.
Config gets instantiated early on in the bootstrap process, so a lot of CI classes/methods aren't available to it. If you want to see if a directory exists, you just have to use regular php to check it and probably not some CI way.
Code:
if (is_dir('/path/to/your/dir'))
{
$config['defaultTemplate'] = 'something';
}
else
{
$config['defaultTemplate'] = 'something_else';
}