Change permission on mainfile.php so that it can be written to during installation.
If trust path is inside install folder, use root path constant in definition of trust path.
During installation, avoid warnings by settting default timezone to UTC if none set.