Use drupal_is_cli instead of php_sapi_name.

Fixes #11 
I think this should be

```
if (drupal_is_cli()) {
```