use ::File#split when dividing dirname from basename