Added encoding to bencode.