Fix compilation and issue #5

Forgot to remove one reference to database header and made miner not to
store full path to the storage. Currently only relative path to the top
of the storage directory is stored.