Well I think feppe wants to completely automate the process.
If one is willing to place each 50 pixel square manually, there is a good way to do it that takes advantage of Photoshop Snap so you don't have to exactly position each square.
Eidt->Preferences->Guides, Grids & Slices
Set "Gridline every 50 pixels" and "Subdivisions 1".
Create a new file 1000 x 1000 pixels.
Press " Ctrl + ' " to display the gridlines.
Make sure View->Snap is selected and that View->SnapTo includes at least "Grid".
Set the Select Tool for "Fixed Size" and "Width: 50 px" and "Height: 50 px".
Now open up a few of your source files at a time. Place the selection square over the desired piece of the image and Ctrl-C.
Drag the selected bit over to the grid, and drop it. It should snap into place. With no apoplectic micro-positioning needed.
Now the problem is you get new layer for piece you drop. That means you can easily rearrange the grid, but it also means you will wind up with 401 layers. So every so often you may want to merge the layer stack down to a single layer. Or go crazy.
You can also get borders if you maybe you Grid a little bigger than your image squares, and have a colored background at the bottom of all the layers.
Man, this is SO BAUHAUS and SO EAMES! I just love it, gotta do some of these.
But it's not exactly what feppe wanted, sorry.