Autopep8 style whitespace cleanups & pre-commit hook

I've got a couple bug fixes I'm keen to commit, but I was wondering if you would accept a PR for a pep8 update as the trailing whitespace, etc... makes it a pain when your environment is set up to eliminate such things. If not I'll just start submitting the small fixes with your current formatting.

I also added a really basic pre-commit hook to check pep8 style, wasn't sure how you would want it installed. Only place I could see for now was doing it in setup.py.