Add error handling for badly formatted JSON file

Signed-off-by: Dan Rumney <dancrumb@gmail.com>
Merge branch 'feature/support-fig-json' of github.com:dancrumb/fig into feature/support-fig-json