Implement --earlyexpunge option.

Fixes #1071