Folder.py: more explicit error message when disallowed subobject type is raised