Wrap piping command inside a begin/rescue to catch invalid commands

Fixes #341

I'm not too sure about catching `Errno::ENOENT` (It's a pretty generic error and may be thrown on other occasions) but it does the trick.