Prompt user to confirm before deleting a query

Resolves #331.