flock when appending in File

Fixes #6