Implement dump(N) to return first N frames of data.

Closes #146

Also adds tests to check that `dump()` and `dump(N)` return data for the expect number of frames.