Added function to correctly handle JSON parsing
Use new parse_json function
Added tests for properly catching bad JSON
Fixed tests for python 2.6
Merge branch 'feature/issue-21-catch-invalid-json' into develop