Fix outputting multiple files

The -m option currently doesn't work - it tries to pull the path out of the context instead of config and tries to write to a directory path (which errors).