[bugfix] Use python specific api cache paths in cache maintenance script
[bugfix] Use python specific api cache paths in cache maintenance script

- use python version specific api cache paths
- use os.path.join to concat paths
- don't restore the api cache entry if deletion is wanted only
- skip cache path if version does not match
- use pywikibot.handle_args instead of the deprecated variant

Bug: T183911
Change-Id: Idf7bcf8b8ecefc5fc3979bb2aa4c7cf4b67d63fc

wikimedia/pywikibot-core,PersianWikipedia/pywikibot-core,wikimedia/pywikibot-core