Added tests

Addresses #30
```
assert.ifError(error)
```
it gives much better output when there is an error