json2dir tool + fixes
Test for json2dir and dir2json