fixed pattern matching when deleting snapshots

This ensures that creating a snapshot named 'foo' will not
accidentally delete a snapshot named 'foobar'.