Fixed error and cleanup

Preventing from braking if a non github folder is pythogen folder
Some cleanup with autopep8