You say that the ..../images/math directory is empty. It doesn't even
have subdirectories with one-character names? These should be created
automatically.
You say that you think it has to do something with the new hierarchy
of ../images/math/ dir. Did you try going back to the old behaviour,
where all pictures are stored in .../images/math/ ? This can be
achieved by changing
return $path;
in the function _getHashPath in includes/Math.php to
return $wgMathDirectory;
(at least I think so, I didn't test it).
To be honest, I have no idea what the problem is, but perhaps it helps.
Jitse