Fix issue when trying to use a cwd folder outside current cwd