Prefer 'unless' over 'if not'

When returning the execution, a new line character is appended to the
command. Executing 'chop' trim it.