[ticket/12099] Correctly fix go back to root before prepending the root path

This allows moving app.php outside of phpBB and still work as expected

PHPBB3-12099