Big rewrite. Factor logic out into BackupDir class.