[RFC] rename misc2.c to be more descriptive

In effort to eliminate the need for misc2.c (#209), I have pulled out various functions defined in misc2.c related to file IO to, correspondingly, fileio.c.