make DEBUG test GetNamedPipeHandleState non-terminal (workaround for wine usage)
fix spawn tests
win: sort windows environment variables before passing to CreateProcess