Fix race conditions with MS-Windows lock files by using _sopen.