Fixes for installation. header.php needed a newline at the very end, strange. Must be a php thing, or perhaps a side effect of the
search and replace cleanup. In any case, after fixing it the newly installed sample site works fine. The fix-perms.sh script was
updated to fix an excessive -R for setting file permissions.
Fix typo in exception throw line, missing paren.