Added support for basePath calculation

Now supports running wave in a subdirectory, and automatically detecting this using the SCRIPT_NAME server property. Inspired from the Symfony support for the same feature
Attribute the HTTP module code a bit better