EDIT- Ok I worked on this issue a little more with the help of a programmer friend and we figured out a better possible solution.
1. Find your exported project's package.nw file and open it (it can be opened as a zip).
2. Open up the index.html file inside that archive.
3. Paste this code right before the last closing </script> tag:
var win = window['nwgui'].Window.get();
win.on('close', function () {
window['nwgui'].App.quit();
});
4. Save the new index.html file and the changed package.nw.
5. Test out your game to see if all processes close fully upon exit.