Fix windows code, add return value check

Add semicolon in windows code.
Check return value of g_shell_parse_argv() to avoid using
uninitialised variables and add message for the user.