host-deploy: use try-with-resources

Change-Id: I1e7530f1c4f19f450527aaecc4b73608b5c81683
Signed-off-by: Alon Bar-Lev <alonbl@redhat.com>