Test cleanup should only remove resources created by tests

Fixes #388