class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
I was having the same issue (took me a bit to figure that it was mimi type) and I test .26 and works like a charm. Please email me if you need more testers, I am planning on using your script in a wordpress plugin I am working on.
Thanks.