[bugfix] use string instead of Path-like object with "open" function
[bugfix] use string instead of Path-like object with "open" function

open() function does not support Path-like object with Python prior to
3.6; a string is required for older Pythons.

Bug: T272345
Change-Id: Icd00d8ca88a06a5e08f02cd6b75114668d2c6d32

wikimedia/pywikibot-core,wikimedia/pywikibot-core