make the check for a persistant undo a bit neater

Rather than using str!= use to check for a buffer name