OS-1967: bash 'test -x' always returns true