Updated handling of markdown styles to make it more robust (fixes #59).
Updated keywords to be re-applied after SaveAs only when needed.