Tweak to toggle markdown flag to match buffer type

Tweak changes introduced in 222b6503f36c9e1ea3963686eef62cd2ccbc0593

If first `get_note` fails then let the whole thing fail whereas
previously it would still attempt to update the note without any changes
to the systemtags property. If `get_note` fails that means the API is
probably down so there is no point trying to update the note.

By making this change I can also make the next commit a bit cleaner.
Updating a non existing note creates a new one

Fixes #29

There is scope for cleaning up the code I'm sure. For example, someway
of avoiding duplication that comes from checking the status in multiple
nested IFs and returning update failed