Add directory as argument to dictToJson