fix it directory test... and use try-resources

Signed-off-by: olivier lamy <olamy@apache.org>
2 files changed