Force sync to disk prior to renaming the file for additional safety.
Bug 969112 - RFC 1121 (sect 2.1) specifies that a host name must start with a letter or number.
Unit tests mock File object needed to know about the fsync call.