Writes a matrix to a file, preserving row and column names.

save_matrix(x, fname)