Start adding tests for actions

Still work-in-progress. This way of testing completely bypasses termbox and stuff, but it's still better than nothing.

Thoughts? @syohex