Fix auto-exit on windows

Close stdin by using pause() instead of destroy(). This allows the script
to exit automatically on Windows.
Merge pull request #5 from rmorrin/master

Fix auto-exit on windows