I have resent the patch as a "try 2" (there was a try 1.5 to fix test issues under windows older than XP SP3).
The patch contains changes based on your feedback.
Some things I stand by, and won't change. If you feel differently, you should argue for their validity a little bit more than "don't use access(2)."
Some things I don't have time to address, for example this NtQueryInformation thing I know nothing about. Sorry. That seems to be something that can be done as a separate commit by someone who cares about that aspect (you?).
So this is it. You like, you take. You don't you drop. For my wine tree, it works beautifully and I am good with that.
Cheers
C.