Fix some inconsequential file descriptor leaks in the demo tools to silence cppcheck...