Improved functionality of _BasePath class.
Written tests for new functionalities.

Signed-off-by: BARISH CHANDRAN B <barishcb@gmail.com>