Added bin/ directory
Fixes to unit tests
Adds check to ensure Json values are actually iterable before iterating.

This implicit cast without this check caused a segfault in many targets on Windows.