Fix dump_modes for the api change and move it into a subdirectory