s4/test: make test_cleanup() in libnet_user library more robust