fix script path escaping on windows, refs #293
properly express state information on server connections, refs #315