(Juho Heikkurinen juho@consumerium.org): Hi.
As I checked where it put the test file I noticed the the png I had uploaded had permissions set to -rwxr-xr-x which is not a good thing.
This isn't a security problem on Wikipedia because Apache is configured not to execute anything outside the wiki directories. But I can see it might be a problem for other installations, so I added a "chmod(..., 0644)" to the code after the move.