Opened files are closed properly after writing.
Authored by: michaelbieri 2011-05-30
Parent: [r12827]
Child: [r12829]