Cleaned up storeCalculation and implemented fetchCalculation

Files are stored in xx/yyyyyyyyyyyyyyy, where xx is a folder named
with the first two letters of the commit's SHA-1, and the file name is the rest
if the SHA-1.

Change-Id: I25880e36085ce3f56022a8262e44dc5cf56da158