Fix instability in dx-toolkit file/deepdirs test

Summary:
Adding a wait-for-close flag, when uploading a file. This is part of the dx-upload-all-outputs
script.

Test Plan: Existing tests, especially file/deepdirs.

Reviewers: klai

Reviewed By: klai

Subscribers: bagee

Differential Revision: https://phabricator.dnanexus.com/D160