Simplified buffer exchange
Test for extracted file sizes
typo when filtering dirs...

though I'm not sure filtering dirs makes any sense, as if a file inside
the dropped dir gets written, then the dir gets made anyway...
Unnecessary continue removed
Tied generics down better
Get rid of IntelliJ complaining about inferred type of Range.from
Declare closure type, again to stop IntelliJ whining
Missed <T> off TransposingIterator constructor
Call the static method to aid type inference (rather than replying on
the extension already having been applied)
Better variable names and got rid of external var when building weights

(not sure it's better)
Added inline javadoc tests/examples for transposedIterator
Added javadoc for withClosable