Fix check_opened_connections test

Sometimes $bad_connections{'127.0.0.1:9150'} can be undefined.