Code Restructure, Merging CGI

- Script should be callable from CGI or from local script
- Detects CGI and calls appropriately
- CGI code dummy for now
Revert "Removed functions to do with Outlook ICS Files"

This reverts commit ae40266069204ee411350d5fd3d31f40d89187af.
These changes should be better enabled with a toggle
CGI/Local script merged
Disable Outlook Rules for Facebook

- Bugfixes as a bonus