resolve #270: catch shell errors

@kevgo
That seems brittle, but the best we can do here for now. Good with me.