Write and read problem_data and mapc2p in both ascii and petsc formats.
Avoid duplicate code.
Merge pull request #360 from ketch/write_problem_data

Write and read problem_data and mapc2p in both ascii and petsc formats.