Tests for JSONfile (along w/ fixes to generator)