Fix a bug that score is not always defined.
Bug spotted by mbootsector:

It is possible that $score is undefined. This happened for example in the following position:
r1bqkb1r/1p3ppp/p1n1pn2/8/3P4/1BN2N2/PP3PPP/R1BQ1RK1 b kq - moves f8e7 f1e1 e8g8 c1e3 c8d7 f3e5 c6b4
d1f3 d7c6 f3g3 g8h8 a2a3 b4d5 e3g5 h7h6 g5h4 a8c8 b3c2 e7d6 f2f4 b7b5 e1c1 d8b6 c3e2 a6a5 g3d3 b5b4
e5c4 b6b8 c4d6 b8d6 h4g3 d5e7 c2b3 c6e4 d3b5 e7f5 d4d5 c8c1 e2c1 b4a3 b2a3 f6h5 c1e2 f8b8 b5a4 h5g3

When the engine was allowed to think only for some milliseconds, it didn't send a score, but just

info nodes 0 time 18
bestmove h2h3 ponder (none)

which led to undefined variable warnings. So if score is undefined, avoid using it in the code below.
For windows compatibility, read files in binary mode.

Picked from patch by mbootsector
At the end of the tuning, wait for the engines to quit cleanly.
Improvement by mbootsector
Detect if script is executed under Windows
New subroutine: engine_readline()

To support reading engine output also under Windows
Do not call open2() and launch new threads at the same time

HACK: Under Windows the combination of starting new threads and
calling open2() at the same time seems to be problematic.
So wait for 3 seconds to make sure each new thread has cleanly
started the engine process before starting a new thread.

Reported and fixed by mbootsector
use AutoLoader to disable the following warning on Windows:

Can't locate package AutoLoader for @Math::Round::ISA at spsa.pl
Update README for setting up the tool on Windows