Added string escape function to URL class and moved all environment variable access to Main.cc