Bugfix/pyflakes robustness

This branch fixes a bug in the pyflakes its based on the secrets leaking branch so ideally this one is merged first to ensure the diff is looking ok.

There was a issue in the "find" expression in test_pyflakes.py which was not noticed because we did not check the return code of the find call (nor the stderr output).
This is fixed now and the test is made more robust by adding a "canary".