Portable interface to file locking (flock / LockFileEx)
