Fix issues with Unicode filenames under Windows

Also, only open the main setup file once.
Add support for combining --version with -s and -q