Add __main__ to various python files
Add pynose.sh script to run nosetests on tools/*.py
Add pyflakes.sh