Fix fencepost math errors in directory column layout logic.