Fix an encoding problem for running ViewHtmlAction

- Add null checking for FileObject
- Check encoding for FileObject if ViewHtmlOnSave is enabled
Merge pull request #21 from junichi11/patch

Fix an encoding problem for running ViewHtmlAction