Clean up handling of NPE when sending a message

b/13037992
We don't want to abort the entire sync if writing the
temporary file fails.

Change-Id: Idc90ad64d961b24d46975b89ad65b2456cd19413
3 files changed