change ebook pages detection to better fit spec, add more flexibility as to where pages can be