Update test directory layout. Fix test OS compatibility.