Passing the output directory to the inmf_main.m. Minor changes in the rest.