Added UTF-16 support by reading BOM

This adds support for UTF-16 files (LE and BE) by reading the first two bytes and checking if it's a BOM