PEP8, with open, gitignore, requirements

- Updated for PEP8 (except for some line lengths)
- Replace open / .close with a “with open”
- Added a gitignore for a virtualenv and pyc files
- requirements.txt for pip