server: Create workdir on demand, delete contents in test