p-n junctions in molybdenum ditelluride