I don't think there's a tool for this, but you can probably write one easily. The only folder you need is the highest level (16 in your screenshot). Tile 0_0 goes in the upper left corner, then tile 1_0, etc. wrapping around to 0_1 on the next row.
To get it exact you'll need to take a look at whether there was any overlap when the tiles were created. Look in the .dzi file for "overlap". If there is, you'll need to compensate by omitting the overlap. Here's more info on the file format: https://github.com/openseadragon/openseadragon/wiki/The-DZI-File-Format