remove UTF8 BOM and improve performance

Detect and remove UTF8 BOM, this makes it is easy to handle windows
NOTEPAD edited files

Improve performance by replace 'scanner.Text()' with 'scanner.Bytes()'.