Fixed issues with webpage.setContent()

location url was not set correctly and resources were not loaded
with the right url.

Closes #201