JZ/DW:unit tests, precommit hook, some refactoring

Sorts out issues #7, #4 & #3
Merge branch 'consolidated' of github.com:onaio/python-json2xlsclient into consolidated