t/test-lib.sh: fix TRASH_DIRECTORY handling