virttest: Update the method to get test case name in write_subtests_file...

...s

We have some subtest name include "-". And the original method will use
the last word in the test case name as the whole case name in the subtest.cfg.
@ypu I mean `name = name[1:].strip()` should work exactly the same as your fix. But this is just nitpick, your fix work fine. :-)