ninja/mac: Try to fix 'IOError: [Errno 2] No such file or directory' error.

Happening on this Blink bot:
http://chromegw.corp.google.com/i/chromium.webkit/builders/WebKit%20Mac%20Builder%20%28dbg%29

This probably broke when we changed the generator to write ninja files after
their contents are known -- because of that the folder doesn't exist yet
when the per-arch files are written.

R=scottmg@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1726 78cadc50-ecff-11dd-a971-7dbc132099af
diff --git a/pylib/gyp/generator/ninja.py b/pylib/gyp/generator/ninja.py
index 1d4b913..368993c 100644
--- a/pylib/gyp/generator/ninja.py
+++ b/pylib/gyp/generator/ninja.py
@@ -396,9 +396,9 @@
       if len(self.archs) > 1:
         self.arch_subninjas = dict(
             (arch, ninja_syntax.Writer(
-                open(os.path.join(self.toplevel_build,
-                                  self._SubninjaNameForArch(arch)),
-                     'w')))
+                OpenOutput(os.path.join(self.toplevel_build,
+                                        self._SubninjaNameForArch(arch)),
+                           'w')))
             for arch in self.archs)
 
     # Compute predepends for all rules.