fix PR7380: use 'test' instead of shell builtins. This improves