Update to use latest Python idioms

Few minor changes to use latest Python idioms.
- requirements.txt
- if __main__