lock all files being written to when writing (except when the file has been opened in append mode)
closes #766
CHANGELOG update
merge b14536a028fae1dd39df4eafcc05d50ded5728c8...cef1fbbe624792d52300d772949d122daaf9529c (from 0.11)
refs #766