Make the pub support look better on Windows

This change makes it so that on Windows, a terminal doesn't pop up when running pub (this is how it already behaves on other platforms).

Also some cleanup.