Fix 2 bugs in searchWikipedia() example function

The search term shouldn't be encoded, and the function should return the promise.