Automatically decide whether to initialize the database
Add initDB function
'pkg init' command

Fixes #10
register: be smart about initDB
Implement unregister command
Implement list command