User directory (Apache) fix, Undefined Constant 'DATA' fix (PHP Strict)

Changed $_SERVER['DOCUMENT_ROOT'] to use realpath() from the $path variable. BASE_PATH now just uses $rel (defined from $path).

Added checks for DATA and resulting $plugins variable in index.php to prevent undefined constant DATA notice.