Added check to convert a relative base dir to an absolute path