Add FileLineReader class and refactor exception hierarchy.

Create a base exception for all the modules, and a root exception
for each module, which derives from the base exception.

Signed-off-by: Paulo Caetano <paulo.a.o.caetano@gmail.com>