Fix unit tests so they run on both Windows and Unix