Fix test_dirs return value where connection failed