site.py: pyflake, remove unneeded debug print

- explicit import statement for pywikibot.exceptions
- local variable 'filterredirs' is assigned to but never used
      wrong name -> renamed to filterredir
- local variable 'prev_user' is assigned to but never used
- local variable 'filesize' is assigned to but never used
- local variable 'err' is assigned to but never used
- undefined name 'namespace'

Moreover:
- remove absolute path for pywikibot.data.api.APIError
- remove unneeded debug print of deprecated parameter

Added TODO in site_tests.py, some methods lack tests

Change-Id: I79660f877102472fcab00732f9f0c310bea3a0c8
Merge "site.py: pyflake, remove unneeded debug print"