A simple file-locking implementation in C#