handleArgs: Reformat the regex for version to not break on old git versions

On at least Git 1.7.0.4 `git checkout -- pywikibot/bot.py` still results in
those two lines getting automatically changed to

  m = re.search(r"\$Id$", ver)

when using `git diff` and

  m = re.search(r"\$Id: blob-object-name", ver)

in the file itself.

This breaks further code because the regular expession doesn't match
pywikibot.__version__ and thus `m` is None but is used by the code later on as
if it were not None.

This seems to have been fixed in later git versions (at least 1.7.9.5 and 1.8.4
don't show this behaviour).

Change-Id: If3ddc5c86c8ef2f9214f367eed3634f708c8a440