Fix various bugs and improve speed for Perforce 2010. Fix bugs for Windows. Add error count report at the end of the process.