implement emscripten_wget

I've included a `test_wget.cpp`, but not sure how to make it a test case, due to cross domain errors.