fixed .txt output being wrong if more than one line is asked for
fixed .txt output being wrong if more than one line is asked for


Former-commit-id: 7423c36a74e650cea1bc0acf3cabd5e85681ea92
neuropoly/spinalcordtoolbox,neuropoly/spinalcordtoolbox,neuropoly/spinalcordtoolbox,neuropoly/spinalcordtoolbox,neuropoly/spinalcordtoolbox,neuropoly/spinalcordtoolbox,neuropoly/spinalcordtoolbox