Refactor: run test within temp dir