Small bug fixes and linting
Small bug fixes and linting

- Fix undefined variables
- Don’t let Python 3 try and call undefined unicode
- Fix lint warnings

revolunet/sublimetext-markdown-preview,revolunet/sublimetext-markdown-preview