Added directory clean up routines for use in archive.