Change C.W.D. before deleting work dir; PEP8.

Change C.W.D. before deleting work directory.  PEP8.