fix pruneEmptyDirectories for modules that are single files