Update build.bat

Cleaned up the build.bat file.  Added unit test running and error detection.