Update shutdown to work on Windows.

I updated your function since I suspect using the older version doesn't work well on Windows (at least it didn't for me).
I've also copied (with credit) your function here:
https://github.com/talgalili/installr/blob/master/R/install.r
(so I'd have my own version to use)

Cheers.