Locate index server logic in MasterController

Btw, use file system as storage to test master controller. Because it is too complicate to set up mock objects for each test: `MasterControllerTest` is conceptually an integration test not a unit test, because the tests involves so many classes. 

We can still use mock object to test some failure cases that are hard to produce (e.g., file system errors).