Fix Windows path separator issue in `baseFileName`.

Windows accepts forward and backward slashes as path separator.