I'm going to give you 75% of a solution, I can't figure out how to get past the final limitations.
I was initially thinking this could only be done with a custom script. But, as odd as this sounds this could be accomplished through an automated contact sheet merge in Photoshop. Obviously its not its intended use, but it accomplishes what you need. My example was used on 8 random images.
I used the Contact Sheet II (This is Creative Cloud, but I believe it is available in CS6 as well) and I merged 8 images into 2, (2column x 2row) contact sheet as you can see.
The problem is that because this was not its intended use what you are looking at is opening 12500 documents at once and Photoshop won't be able to handle that. So I then tried to automate the process using Photoshop Actions to save as pdf and close after every contact sheet merge. I recorded the action and then tried batching the action on the source directory--
The problem is that the Contact Sheet II action itself is its own loop. It will want to open and create every single combined file before it gets to the close action.
Now I say 75% of a solution because I know changing this process takes a little bit of ActionScript magic that I don't personally know how to do, but hopefully your programming background will allow you take this solution and make it functional