When probing directory file modes, resetting os.chmod to 0o600 before
os.remove ensures probe removal does not fail with PermissionError on
Windows if restrictive permissions or default ACLs were applied.
agent: yes
AI-assisted: yes
glb_writer._output_mode and rtti_scan._report_mode read the umask with
os.umask(0) then os.umask(mask). The umask is process-wide, so any thread
creating a file in that window got mask 0. A probe file created with mode
0666 gives the same bits (and honours a directory's default ACL) without
changing anything. Raised by kapitche on #750 and #728.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>