Escape apostrophes when needed