PEP8 and stdin fixes.
Merge pull request #1 from rantenki/master

Fixed some PEP8 stuff, and a security hole.