use boolean instead of string to compare writeable flag
fix empty editor when double clicking txt file or trying to open a second editor from the search results
return mimetype for file
use mimetype to show html, fixes html files not ending in .html
Merge pull request #668 from owncloud/texteditor_fixes

Texteditor fixes