that's a weird one. I was seeing some VERY strange behavior with file uploads, too... until I starting cutting away at my script to try to narrow down the problem and in the process, it "fixed itself!"
right, so what that really means is that my code had a bug ;-) and I guess this is a long, roundabout way of saying... be sure to double- and triple-check your code. i wouldn't doubt that you could be seeing a sporadic install problem or something, but i also wouldn't doubt if you might have overlooked something. i know I sure did and it took me hours to fix what was ultimately a really, really dumb bug on my part.
best
eric