Fix Windows path separator issue in `baseFileName`.

Windows accepts forward and backward slashes as path separator.
Merge pull request #2869 from marchaefner/master

Fix Windows path separator issue in `baseFileName`.
encode unicode src, test added