Improve windows shell mode; fix edit() function for windows

Prepend 'cmd /c' to edit function `start` command to allow files to be opened properly on windows. Also prepend it to repl_cmd commands to better emulate shell mode for windows. Fixes #7107.