Bug fixing curPageURL() function if filename not index.php