check key exists before trim

Error happend on test. like ``oil t --group=Model_Foo``

```
Notice - Undefined offset: 2 in PKGPATH/oil/classes/command.php on line 288
```


Signed-off-by: takyam <takayuki.yamaguch.m@gmail.com>