Added ability for the archive option to be a function.

Closes gh-68.
v0.5.3