Split up `index.js` for testing.

Split up `index.js` so that the execute logic can be exported from a
sub-library for testing.

See #14.
Write headers from `execute`.

Closes #14.
Merge branch `split` into `master`.