Slight improvements to exitWithError()

* Allow empty error message - will default to the title
* Respect the protocol of the server
Don't change $_SERVER
Codestyle
Merge pull request #9 from jrfnl/Better-exit-with-error

Slight improvements to exitWithError()