[ticket/11486] Root path function created and existing code refactored

The new method get_root_path() returns the current root path

PHPBB3-11486