I have tested this patch in linux (Ubuntu 18.04) env only , which is working fine. It will be great if someone can review/test in the Windows environment as well as I don't have the setup ready for that.
Just did an eyeball review. You've included homedir path in the response rendered JS file. You're exposing underlying directory structure to users even in server mode. This is not appropriate. This info should remain at the server and not at the client side.