Fix to allow tests to pass in windows

When $? is available, it is used, but in some cases it's not available,
so we just indicate "unknown" exit codes in that case.