I cannot actually test this package on Cygwin for at least two weeks (in fact, I can't on any computer right now), but the change in question for Cygwin looks right still (see #10240, as mentioned), and #10240 does in fact work (I've used it numerous times, and !RegB on the sage-windows list also was able to use it properly). That's as close as I can get to positive review for now, I'm sorry - is that enough? I would say that #10240 would have positive review regardless of whether it is "duplicate" or not.

As for the rest, it looks right, but I have not actually tested any of it, including the quoting etc. I'm sure that someone even a little more advanced in shell script could give it an immediate positive review (or needs work if there is something obvious missed).