[BUGFIX] PathUtility::get...FileOrPath() does not work with basepath

PathUtility::getAbsolutePathOfRelativeReferencedFileOrPath()
Add a check to the function to identify a given basepath as described
in the function header.

Resolves: #57918
Releases: 6.2, 6.1
Change-Id: I8de12cb917b2f32490bb160686ce06a036abfd85
Reviewed-on: https://review.typo3.org/29467
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Markus Klein
Tested-by: Markus Klein