Some fixes for pyflakes 0.7.3

Pyflakes 0.7.3 test doctests too

Change-Id: I805085fd3d06e39f5eba8b07f004097068b50bca