Changed mkdir for mkmgen and added example test