Fixed buildUrl to accept absolute urls using http

The new regex allows for the s in https to be optional.