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.
Merge pull request #2 from MnO2/master

Add File class like interface and Unit Test case