Added fsync call to dexopt.

If various system-level things go wrong you might end up with a
correctly-written .odex header but an incomplete file, which ideally
would never happen.  This adds an fsync() call before we write the
header to make this less likely.

Change-Id: Ie5ac67dc7185ca9a4995710688e1219e46477c12
2 files changed