Added readConfig() and basic unit test.

Signed-off-by: Kouhei Maeda <mkouhei@palmtb.net>