Fix removal of analysis resource files.

`shutil.rmtree` can only remove directories. Switched to shell command
and `rm -rf` so that this also works with files.