Fixed relative download-url-prefix config and added a test to catch if it breaks in the future.
Added debug route
Remove dependence on SCRIPT_URI and SCRIPT_URL $_SERVER vars that don't exist in some versions of Apache