Use realpath(root_dir . '/..') instead of dirname() to get real base dir

Symfony 2.4.5 changes how the kernel.root_dir is returned (to include .. components), so dirname() does not work properly.