properly clean up the path

Before it was kind of a no-op, since the methods are not called when written
this way in a regex.
call shell() with cmd only, and fail() on its result