maint: update testing for windows

Add some special handling and exclusions for windows based machines
maint: improve new line detection so tests pass on windows and unix