Introduced temporary directory copy creation for tests.