copy and cleanup work dir, fixes #33 and fixes #34