[IMPR] enable similar script call on toolforge
[IMPR] enable similar script call on toolforge

- use pathlib methods in find_alternates
- use _pwb_dir as base directory
- return plain path string from find_alternates

Bug: T298846
Change-Id: If04df2d722b09b5a185489cd8d05d5e3f082a42e

wikimedia/pywikibot-core,wikimedia/pywikibot-core