Handle spaces in path when opening files

A quick patch for #1292, tested on OSX and Ubuntu 64bit. The solution is rather hacky, but further review would be needed regardless, since I have no way to verify this change on Windows.

You might notice the additional predicate in rebuild-argv. It is an ad-hoc check for node-webkit arguments, required on OS X because light.sh seemingly launches LT twice; this check is unsound, albeit not significantly more so than parsing for `<d><d>dir` already was.