cp: Fix Windows paths (#3250)
cp: Fix Windows paths (#3250)

Paths without `/` separator were not trimmed correctly.

Fixes #3241

Regression originating from #3115
vadmeste/mc,minio/mc,balamurugana/mc,minio/mc,krisis/mc,krisis/mc,vadmeste/mc,balamurugana/mc