Make sure target path is in target dir.