Sometimes we can have path be a Pathname object instead of a string. So let's nip that here.