function extractArgs(str) {
//return an array of unquoted arguments from the command line.
//we either want non quote stuff ([^"]+) surrounded by quotes or we want to look-ahead,
//see that the next character isn't a quoted argument, and then grab all the non-space
//stuff this will return for the line: "foo" bar the results "\"foo\"" and "bar"
var matches = str.match(/((?!"([^"]+)")\b(\S+)\b|"([^"]+)")/g)
//unquote the quoted arguments:
var args = new Array()
for(var i=0;i