Workaround for invalid path characters on Windows