[pywikibot] How to avoid leaving extra blank lines when removing templates?