Alright, it turns out there's a separate function proc_remove_subtree()
that's specialized in removing /proc directories and their children, so that solved both of those problems. I still don't have a way to distinguish failed files and existing files, but this eliminates the need to check for that as they're guaranteed to be deleted after removing the module.