Add build depends on flake8.

Change-Id: I2d24df3f6356c1d1f587275df0d04780bd18fba8
Fix lintian issues and other problems.

Change-Id: I5714ae69fae7751f87da32399878b224aa8da8cd