Replace the code:
with the following one:
$result = str_replace('/', DIRECTORY_SEPARATOR, $result);
$prefix = (substr($result, 0, 1) == DIRECTORY_SEPARATOR) ? DIRECTORY_SEPARATOR : '';
$result = $this->join($result, $this->getModule());
$result = $this->join($result, $this->getMiscPath());
$result = $this->join($result, str_replace('/', DIRECTORY_SEPARATOR, $this->getFilePath()));