Refactor the main program into its own class.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Pass command-line arguments in as a parameter.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Refactor out passphrase reading.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Add unit tests for main program.

Most of the bugs in daniel have been in the main program and command line
handling.  Improving the testability of the code and implementing unit tests
for this will help avoid future problems.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>