remove unnecessary File#dirname calls