Add first steps of RM2 algorithm

    - Add tests for RM2.
    - Create HDFSUtils for convenience.
    - Minor changes in util classes.