Remove pathlib dependency