Process (getOutput): chop trailing newline from command output. Refs #2867

Required to keep compatibility with previous Process implementation.