Fix up some minor things in the add test.

Signed-off-by: Magnus Therning <magnus@therning.org>
Use optparse-applicative to parse the command line.

Signed-off-by: Magnus Therning <magnus@therning.org>
Minor cleanup in Main and Util.Misc.

Signed-off-by: Magnus Therning <magnus@therning.org>
Rename command parts to be more consistent.

Signed-off-by: Magnus Therning <magnus@therning.org>
Move the application dir option out of each command.

Moving it out highlights that it's an option that's common to all commands,
even though it doesn't have much effect in a number of them.

Signed-off-by: Magnus Therning <magnus@therning.org>
Move DB file and dry-run options out of commands too.

Signed-off-by: Magnus Therning <magnus@therning.org>
Remove redundant imports.

Signed-off-by: Magnus Therning <magnus@therning.org>
Aesthetics in Util.Misc.

Signed-off-by: Magnus Therning <magnus@therning.org>