Using realpath for SCRIPT_FILENAME and DOCUMENT_ROOT