Fixed cache bug

The cache was ignoring the database when --reindex was used together with
--write-every=1.
Added --hash flag

This tells Shiva to calculate the md5 for each file, in order to easily find
duplicated files.
Documentation on --hash