Fix nodes unit tests to work on el6; both tarfile and gzip versions don't support closures.

Conversion of 'with' statements used with tarfile and gzip to try: finally:

Also fixes, same bug in importer/download module.