Fixed a recently-introduced bug in setting filenames in read_trees().