Fix two issues with executing sense in my system

I think the result is more portable, but of course check that it doesn't break any of your test setups before merging.