Does the script have to run without any additional installations? It would be trivial in perl, although like the others said, you would need to have a consistent way to determine where to add spaces back in. Something like "after before every capital letter" would work fairly well.
Until you hit abbreviations.
Of course, there's still the issue of name clashes: since a rename is essentially a move, some files might "magically" disappear on you if you rename "A B C" to "ABC" when "ABC" already exists. <<Had similar happen.
Is there a specific reason you don't want underscore replacement? It's fully reversible, and the names wouldn't be escaped in URLs/etc. because of it. Obviously if it's personal preference there's nothing for it, but I was wondering if maybe the concern was something that could be alternately addressed.