BUG: weave: fix issues with temporary directory usage
TST: weave: fix tests on windows
Merge branch 'weave-security-fix' into master.

Reviewed offline because it was marked CVE.