Reformat PHP
Test that .htaccess can be written to

Closes #370.