root is a Path::Class::Dir: stringify it before dumping to metadata

(follow-up to changes in 5.021)