Moved the modal window contents outside index.php to an include file.

Also added a realpath() call for all the filepaths