coremanager.py: Handle core roots that contain both directories and files