added error checking on archive open and switched to filesystem iterator to workaround a bug where directories were being kept open