This patch adds a new internal/safeio package, which is meant to implement safer version of some I/O related functions. For now, only an atomic version of ioutil.WriteFile is implemented. More may be added later if there's a need for them.