Refactor cache path utilities. See: websharks/quick-cache#288