Prevent failure in case stop and rm fail

The commands do not check if there actually is a container to stop,
which, if there isn't, would lead to failure. These changes will
prevent the script from failing in those (negligible) cases.
Ideally, we would check for the existence of said container first.