Hi,
You will find an example script doing what you want there.
As for getting the gene name, I'm afraid this is not straightforward: maffilter does not do that automatically (because the way it is encoded may vary significantly from a GFF to another). The best way is to output minimal statistics of each extracted block, and then use the coordinates of each block and the GFF to extract the corresponding names.
Hope this helps,
Julien.