Refactored tests for unix/win compat