Add -f to rm DOC-* so the command succeeds if there are no such files.

This line was failing building aquamacs24 since there are no such named files.