Do the exit status capture on a newline

* This handles the case where the command passed is comment.