Revise doctest to avoid print

pyflakes 0.7.3 complains about print in the doctest.

pywikibot/tools.py:148:1: F999 syntax error in doctest

Change-Id: Ica39edcc2fe7c5959a7305cf2ad7adc668f1c373