Ensure fclose just in case code is run on non *NIX systems

Addressing issue #99.
If this code is run on systems without *NIX environments and for which "/" could be a file and not a directory, an fclose call is needed.