fixed bug with deleting last note in a notebook
added handling of non-plaintext files; they all get downloaded instead of viewed
in browser