Respect the 'path' config when setting $CFG->sessioncookiepath

Setups using the `path` config ended with invalid `$CFG->sessioncookiepath` set
in config.php (always expecting the moodle is in the root). Moodle core itself
has checks for this so the value set in config.php was ignored in that case.