Ensure test_done writes down counts for './somepath/sometest.t'

While cleaning up a test script and using the set -e option, I found that the test_done function fails to create the .counts file because my build system invokes the test scripts as:
```
$ ./somepath/sometest.t
```
To see why, imagine $test_results_dir is '/home/user/project/test-results', and that $$ expands to 123; then, test_done would ensure that /home/user/project/test-results exists, but then try to create '/home/user/project/test-results/./somepath/sometest.123.counts' (that is, the 'somepath' would still be missing).

This patch attempts to solve that.