Ensure flake8 runs with a valid settings file

The H301 check sometimes imports a file when trying to tell whether it
is a module. Ensure we run flake8 in a valid environment to avoid
any side-effects from this.

Fixes bug #1191748.

Change-Id: I35fdefcd8f4c465a89f884299a0a9f4a4c79a6f6