Add rake task to run test suite.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Split overlap detection into a separate method. Add tests.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>