Adding some tests

Wrote some tests in nodeunit.

Found a few bugs/quirks. Tests that expose issues are currently commented out. Assuming they are valid issues, I'll work on subsequent PRs with failing test uncommented and code changes that make test pass.

No Job#schedule tests using cron expression because can't get second granularity and tests already take ~60 sec to run.

To run tests:
```shell
npm install (first time, to get nodeunit)
npm test
```