Fixes space completion in paths in the REPL like: cd C:\\Program\ Files\\
Merge pull request #8838 from dhoegh/space_completion

Path with space completion fix for REPL