[S21.5] check_writable for Win32 and cygwin repair