Make file serving code generic.

Why not?