Bug fix for file counter

When initlib was called multiple successive times, the second time
it failed because GetNextFile said that the file list is empty.
This assumption is based on a counter cnt which was declared as
static int cnt within the GetNextFunction(). This declaration has
been removed from the function and can be initialized with the
function InitFileCnt.