Rewrote zip directory function.

* Trying to remove copyright concern.