Changed File Inclusion Method for including "maincore.php"

In order to keep Permalinks work for multiple level of sub directories,
we must change our way to include "maincore.php" in our files.
1. Old way to include:
require_once "maincore.php";
2. New way to include:
require_once dirname(__FILE__)."/maincore.php";

This is because we parse all the php files in the Root directory file
"rewrite.php" for Permalinks. So, it creates a conflict between file
inclusion when both "rewrite.php" and say "forum/viewthread.php" include
same files.
To resolve this conflict, this must be done.