std.stdio: Add file locking function