Make script cli friendly & use php instead of php-cgi in cron file