should be inline
exit(ret) would probably be exit(0)
track timestamps and assume newer timestamps means newer packages

Packages read from the db get the db's mtime, packages loaded from disk
get their appropriate mtime.

Closes #21.