Merge pull request #2 from lowks/master

re #1 add check to see if log directory exists, if not try to make it
Clean up the number of pep8 violations in encoding.py