Add json2dir script

dir2json should follow