A couple of missing 'close' calls.

Windows is funny about deleting unclosed handles; need to take care
of it here to keep the test portable.