ACL file write logic fix as it's no longer in the repo

ACL data isn’t in the repo anymore, so we need to verify that the file exists before checking if it’s writable. Also give a better error message if not.

More in-code documentation. Added a few constants to the index.php page for easy paths.