Added tree traversation to find proper directory.
Added test for selecting history directory.
Added timestamp to generated hash.