Mohammad Rasoulof was sentenced over his new film, which is to be premiered at the Cannes festival.