More internal documentation changes, and bug fixes

Added code to the install script to test that the config, logs and debug
folders are writable, and outputs error messages if they are not. Also
added/updated more internal documentation.