Update script to cleanup properly.
Update script to cleanup properly.

* Add a trap and remove the temp directory.
* Remove popd and deactivate, which never needed to happen because pushd and activate do not change the system they change the sub shell.

PiperOrigin-RevId: 241344553

tensorflow/federated,tensorflow/federated,tensorflow/federated