Remove use of deprecated APIs

Also, add a spec.
How about waiting for an item to be opened instead of a short timeout? CI can be slow sometimes.

```coffee
waitsFor -> atom.workspace.getActiveTextEditor()?
```