See this issue.
The Windows version of codesearch is broken because it doesn't properly close any of its file handles before it tries to remove the files.
My fork has this change which fixes this. My fork has diverged (I added a tempDir argument so that I could move the temp files where I wanted them), but someone should be able to port over my changes without too much issue.