Added mime_type() function which is lua-callable.

  Now use that rather than defaulting to application/octet-stream
  Updated comments on the mime_type function.