chore, fix a race condition when rm'ing reference files

Signed-off-by: Sebastian Freundt <freundt@ga-group.nl>
Merge branch 'test/general'

* test/general:
  chore, fix a race condition when rm'ing reference files