Fixes #2563: Theming is not working if the path map of the theme contains ".." or "." in the paths