Added the cases that the path is split in a local and remote part and
just a local part