binmode doesn't make sense here

- Also causes test failures on win32
Moved unlink() as it can lead to spurious test passes
Define WIFEXITED and WEXITSTATUS on Win32
Merge pull request #2 from worr/win32

Fix tests for Win32