Use pathlib for handling file manipulations

Just playing around with `pathlib` for now.

Makes some things much nicer(default open encoding), makes some things more annoying...