Remove any trailing whitespace from command line

Trailing whitespace caused issues with ParseWords as it appended an undef at the
end of the resulting array.
Better error messages when failing to add torrent