move IOInfo to use pathlib

No change in API, just modernises `IOInfo`. We may choose to go further with `pathlib` in the future but that is for another day.