os2: fix leak in dir_windows, fix netbsd, and add a test for dir reading
mainWindow
keyWindow
bound_endpoint
core:sys/win32