Fix white space.
Replace smart pointer.
Move function to create temprary path from IO to Cache class. Remove this static member in Cache.