Removed some whitespace
use single quotes instead of double quotes for CURL and WGET cmdlines
Looks like some in some environments (like Heroku) the getRequestURL() returns http for both
http and https requests so as a workaround we need to figure out the base URL in javascript