Added the totalLength argument for PeerManager, which is needed to know the size of the last piece
Fixed a bug that was preventing the download and confirmation of the last piece