Changed test_rm retry to be more robust to failures.