protected function resolvePath(array $originalPaths)
    {
        $paths = array();

        foreach ($originalPaths as $key => $path) {
            if (count(explode('templates', $path)) == 1) {
                $path = $path . DIRECTORY_SEPARATOR . 'templates';
            }

            if (realpath($path)) {
                $paths[$key] = realpath($path);
            }

        }

        return array_unique($paths);
    }