Speedup for non-windows, fixes.

Set up a TPP with these scripts, seemed to need some small fixes.

See commit comments for details.
Hmm, that's weird. I tried it with both "secure: true" and "secure: false", and only the latter seemed to allow the script to log on. I'm not sure if this could differ between hosts, or if this is something Twitch changed again.