Fixed leaking of FILE*'s.

Old version of file_exists() would leak FILE*'s when the return was true.