Fixed the Log Out problem with GET parameter in index.php

It doesn't Log Out the user simply with the code added in maincore.php,
when I am using a custom url for Log out, say:

mysite.com/logout-from-website
which maps actually to:
mysite.com/index.php?logout=yes
Fixed appendRootAll function for problem in path of Links

This function was previously not able to replace the Links in the Output
properly. Now, it is fixed, so that it will Render all the Links to ROOT
path of the Permalinks.