Fix segmentation fault by checking variables after fopen(3) calls. Author already notified about this problem.
i see you havent submitted this upstream ... do so and i'll merge it ;)
in cvs, cheers