If a note file gets accidently deleted this leads to ical_export_note
trying to execute fclose(NULL) which leads to a segmentation fault on
current Debian GNU/Linux using libc6 (according to fclose's manpage, the
behaviour is undefined in this case).
The fix tests whether fopen returned a non-NULL-pointer before trying to
close it.
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>