replace broken on.exit with in_dir when calling tar

Closes #42.