Refactor as library

Also added support for extracting tiddlers from unencrypted TiddlyWiki
files.