runner: finally block to ensure that a resource is closed (Prior to Java SE 7)

http://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html

Change-Id: I5ecefd3e5bf84fea2a8735a44236ed4c86b440c4
Reviewed-on: https://gerrit.libreoffice.org/11950
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>