I managed to change the directory, but when I ran the mris_flatten command it still said the file could not be found.