Fix sub_test to no longer output empty .exec.out.tmp files for SSCA2_main.

SSCA2_main has multiple compopts and exactly one execopts defined. Previously,
after compilation we wrote the compiler output to files with names like
blah-blah.<compoptsnum>-0.exec.out.tmp. However, the execution loop treats
tests with exactly one execopts defined and tests with no execopts defined
differently. If there is exactly one defined, the file names look like
blah-blah.<compoptsnum>-1.exec.out.tmp. When no execopts are defined, the file
uses the zero in the name.

This change updates sub_test to handle both cases when writing compiler output
to the execution output logs.

Ran full test pass with comm=none.

paired w/ @eronaghan

git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23643 3a8e244f-b0f2-452b-bcba-4c88e055c3ca