Fix bugs in textlib.py

* Fixed undefined name Error
* Fixed broken link
* Renamed PyWikipediaBot to Pywikibot

Change-Id: Ie14d14edb7e92f8463bf4983804cb3e54ff012a0
Merge "Fix bugs in textlib.py"