win ninja: build fix for msvs_pre/postbuild error test

Follow up to r1837. The previous test used print, which can get lost
when running in parallel. Instead, just error out with an exception
and update the test to expect that.

TBR=bradn@chromium.org

Review URL: https://codereview.chromium.org/139803002

git-svn-id: http://gyp.googlecode.com/svn/trunk@1838 78cadc50-ecff-11dd-a971-7dbc132099af