Fix geteuid not existing on Windows

Previously this would not run on Windows as `os.geteuid` does not exist on Windows.

I think that using the check `"geteuid" in dir(os)` is superior though.