executablePath test: fix file extension treatment

The executablePath test strips the file extension (if any) when
comparing the query result with the expected value.  This is to
handle platforms where GHC adds a file extension to the output
program file (e.g. .exe on Windows).

Subsequent to the initial check, the file gets deleted (if
supported).  However, it is the *stripped* filename that is used,
which is incorrect.  The test currently passes only because Windows
does not allow deleting the program while while any process created
from it is alive.

Make the test program correct in general by using the original
(non-stripped) executable filename when deleting the it.
28 jobs for !8207 with fix/executablePath-test in 185 minutes and 3 seconds (queued for 6 seconds)
merge request