Enable flake8 for the scripts directory and make code compliant. Fixes failures in Py3 build.
cc @ssnyder