Pytest tweaks

Add runtests.py script and introduce flake8 linting.