title: Write to file not working
body: <p>I'm trying to combine images in my app into one file and write it to disk.  </p>
  
  <pre><code>NSMutableArray *array = [NSMutableArray arrayWithObjects: 
                           [NSData dataWithContentsOfFile:@"0.png"], 
                           [NSData dataWithContentsOfFile:@"1.png"],
                           [NSData dataWithContentsOfFile:@"2.png"],
                           nil];
  
  NSData *data = [NSKeyedArchiver archivedDataWithRootObject:array];
  NSError *error = nil;
  NSString *path=@"/Users/myusername/Desktop/_stuff.dat";
  [data writeToFile:path options:NSDataWritingAtomic error:&amp;error];
  </code></pre>
  
  <p>or</p>
  
  <pre><code>NSArray *array = [NSArray arrayWithObjects:
                    [NSImage imageNamed:@"0"], 
                    [NSImage imageNamed:@"1"], 
                    [NSImage imageNamed:@"2"], 
                    nil];
  
  NSData *data = [NSKeyedArchiver archivedDataWithRootObject:array];
  NSError *error = nil;
  NSString *path=@"/Users/myusername/Desktop/_stuff.dat";
  [data writeToFile:path options:NSDataWritingAtomic error:&amp;error];
  </code></pre>
  
  <p>But both produce a file that is 4KB (empty).  If I <code>NSLog</code> the error it is <code>(null)</code>.  Am I making the data the wrong way?</p>
  
  <p>Edit: If I open the resulting file with a text editor, it looks like this:
  <img src="https://i.stack.imgur.com/PrskS.png" alt="enter image description here"></p>