fixed some sonar issues
added tests for basepath construction