Added (very) rudimentary content-type handling.

At this point, it's pretty much just file extension matching. Also, no
charset handling is in place yet, so that still causes some exceptions
for binary files.