runtests.pl: Pad test case numbers with up to three zeroes

Test case numbers with four digits have been available for a
while now.