> `exe.endsWith(dirSeparator)`

Why not reuse the existing logic which calculates `exe` if `-od` is set? I don't see any reason why something should work with only `-of` but not `-od`.