Bug 68929: Use correct 'finish' event instead of 'close'

See http://nodejs.org/api/stream.html#stream_event_finish. This
avoids the image truncation issue, which apparently caused crashes later on.

Change-Id: I53242596eea4a8c7cf69fd6aa52c2448466bda8c