tests: Add temporary working directory for monitor test