gen-mr: skip non-directories

With this, the script graduates from "lame" to merely "hacky". :-)