lock all files being written to when writing (except when the file has been opened in append mode)
closes #690
CHANGELOG update
merge d86cbbd550860f32848600e2bf284c1d9d48b866 to 58b8aa66c80d1082e62e15ec8327ecad64761377 (from 0.11)
refs #690