Implement merge of staging trees to primary.

Also, created an archive directory where stage trees are moved to after
they've been merged.

Closes #26.
Closes #22.