added a check for encoding to help when being run as a launch agen
Merge pull request #19 from chilcote/launchdfix

encoding check