Lines on the Dwork quintic pencil and its higher degree analogues