modified allowed file formats

improves on the fix for #105 without raising #92

this fix prevents binary types such as images from being opened.
Only opens files of type `text/*` and `application/*`
Handling files of type `application/*` is necessary to open javascript, xml, etc...