Speedup for non-windows, fixes.

Set up a TPP with these scripts, seemed to need some small fixes.

See commit comments for details.
Although I noticed #1 was to change `secure: true`. It wasn't there initially.