title: Trailing slash(/) is added in arguments
body: <p>I'm registering a custom protocol handler on my computer, which calls this application: </p>
  
  <pre><code>        string prefix = "runapp://";
  
          // The name of this app for user messages
          string title = "RunApp URL Protocol Handler";
  
          // Verify the command line arguments
          if (args.Length == 0 || !args[0].StartsWith(prefix))
          { 
              MessageBox.Show("Syntax:\nrunapp://&lt;key&gt;", title); return; 
          }
  
          string key = args[0].Remove(0, "runapp://".Length);
          key.TrimEnd('/'); 
  
          string application = "";
          string parameters = "";
          string applicationDirectory = "";
  
          if (key.Contains("~"))
          {
              application = key.Split('~')[0];
              parameters = key.Split('~')[1];
          }
          else
          {
              application = key;
          }
  
  
          applicationDirectory = Directory.GetParent(application).FullName;
  
          ProcessStartInfo psInfo = new ProcessStartInfo();
          psInfo.Arguments = parameters;
          psInfo.FileName = application;
  
          MessageBox.Show(key + Environment.NewLine + Environment.NewLine + application + " " + parameters);
          // Start the application
          Process.Start(psInfo);
  </code></pre>
  
  <p>What it does is that it retrieves the runapp:// request, split it into two parts: application and the parameters passed, according to the location of the '~' character. (This is probably not a good idea if I ever pass PROGRA~1 or something, but considering I'm the only one using this, it's not a problem), then runs it.</p>
  
  <p>However, a trailing '/' is always added to the string: if I pass </p>
  
  <p><code>runapp://E:\Emulation\GameBoy\visualboyadvance.exe~E:\Emulation\GameBoy\zelda4.gbc</code>, it will be interpreted as </p>
  
  <p><code>runapp://E:\Emulation\GameBoy\visualboyadvance.exe E:\Emulation\GameBoy\zelda4.gbc/</code>.</p>
  
  <p>Why would it do this ? And why can't I get rid of this trailing slash ? I tried <code>TrimEnd('/')</code>, <code>Remove(key.IndexOf('/'), 1)</code>, <code>Replace("/", "")</code>, yet the slash stays. What is happening ?</p>