Refactored dirpathbase to basedirpath to be consistent with naming convention