Added a toIcs function for creating ICS files.