Handle CLI scripts

Fix issues : 
- https://github.com/getsentry/raven-php/issues/113 
- https://github.com/getsentry/raven-php/issues/136 
- https://github.com/getsentry/raven-php/issues/97