Added method to cleanup files and directories that are unreferenced or empty.
Method is called during save. Fix for bug 2798427.
Authored by: jimwinston 2009-10-23
Parent: [r640]
Child: [r642]