Bugfix and code cleanup
Bugfix and code cleanup

- fix for string formatting
- format doc and script to max 80 chars
- change page.get/put to text assignment

Change-Id: Iae5a02ac7e83204eb7a8a468e086ac431a6e8572

TridevGuha/pywikibot-core,magul/pywikibot-core,npdoty/pywikibot,npdoty/pywikibot,valhallasw/pywikibot-core,smalyshev/pywikibot-core,PersianWikipedia/pywikibot-core,emijrp/pywikibot-core,magul/pywikibot-core,icyflame/batman,hasteur/g13bot_tools_new,jayvdb/pywikibot-core,trishnaguha/pywikibot-core,wikimedia/pywikibot-core,hasteur/g13bot_tools_new,h4ck3rm1k3/pywikibot-core,Darkdadaah/pywikibot-core,h4ck3rm1k3/pywikibot-core,VcamX/pywikibot-core,jayvdb/pywikibot-core,happy5214/pywikibot-core,Darkdadaah/pywikibot-core,happy5214/pywikibot-core,hasteur/g13bot_tools_new,darthbhyrava/pywikibot-local,wikimedia/pywikibot-core,xZise/pywikibot-core