Add File class like interface and Unit Test case

The advantage of File class like interface is it can
handle resource management automatically when passing
open with a block. It can also be much performant by
reducing repetitive opening of dictionary.