attempt at entirely fixing sys command escaping

Should fix #3511