Revert "use names that work out on unix"

Renamed too much.
Move generic IO-related things into io.c.

This leaves fileops.c (mostly) now just having things that only work
on files.
Rename some things to avoid conflicts on unix.