ant: make sure to close the outputstream

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
cli: make sure to close the outputstream

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
cli: allow directories as arguments

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>