Make -masterCmd work with command prefixes