Fix file descriptor leak when reading files from /proc.
Also calculate and display number of file descriptors used.