Check for "asserts" rather than "debug" on test

The debug flag being checked for seems to be controlled by whether the
build is asserts/non-asserts rather than debug/non-debug. Mostly these
correlate, but not necessarily.

As far as I can tell with various combinations of debug/assetions this
change makes no difference on autotools builds, but fixes a check-all
failure with CMake.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@189147 91177308-0d34-0410-b5e6-96231b3b80d8
Fixes an additional temporary string use.

Patch by Ron Ofir.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@189151 91177308-0d34-0410-b5e6-96231b3b80d8