ensure tmpfile is accessible to dsh subprocess

Specify delete=False in invocation of NamedTemporaryFile constructor to ensure
that the temporary file it creates exists on disk and is accessible to other
processes. Wrap the dsh invocations that depend on it in a try / finally. In
the finally block, ensure that the file is cleaned up.

Change-Id: Ie18a7cb2eaeee2cb9ec95c039d2bb52487ab62a7