OK I did more testing, I can confirm that viewshed won't save a raster to a folder if the "info" folder has already reached arc9999.dat. This doesn't mean you're allowed 9999 rasters in that folder, far from it. You'll only get about 2500, for some reason the dat files grow quicker than the actual number of rasters. Sloppy coding in the extreme.
My workaround is to create a new directory every 1000 viewsheds. I wrote a VB2008 program to produce my .py batch scripts. It's very easy to iterate in VB to create new filenames, and then execute the py file in pywin.
My aim is to leave this running overnight, and with the new folder every 1000 rasters hopefully it won't crash. We'll see in the morning!
Either way, there is a massive bug. Someone decided dat files in the info folder should max out at 9999, and that was stupid. I'm currently creating 13600 viewsheds, and this is just a pilot. Batch tools should be able to handle enormous batches, they shouldn't crash because of some naming restriction.
It's a shame python geoprocessing is so slow. It's only mildly taxing one of my CPU cores. If they could write ArcGIS to work CPUs efficiently I could finish this job in a fraction of the time.
Still, ESRI is not exactly known for efficiency is it?