Huge refactor of HTTP stack.
Add realpath to app_path()

Fix issues when comparing paths for namespace detection on Windows environments.