cleaned up getopt behaviour in windows