Safer cleanup of AndroidManifest.xml