Better error handling in add_torrent. Closes #7.