Updated process() with a slightly more elegant solution for categorizing
the type of file requested (useful for sending encoded text vs. binary
media over the socket)