How to solve blogs.dir subdirectories number limit?

Hi

Images upload :

Instead of having all the images users subdirectories in the same directory blogs.dir, we want to split them per the first two-three characters just like MultiDB Plugin or Avatar Plugin

So we will have something like this :

blogs.dir
|---20
| |---13
| | |---63
| | | |---201363

So how to do that ? (PLUGIN) ?

Thank you