Added console commands for exporting.

Fixes #4.