pkg/util/flock: Implement a simple file locking mechanism