fix #17454: ArgumentError: invalid byte sequence in UTF-8

force encoding the path to 'binary' before the split as in 55cac81