resolves #824 handle BOM when normalizing source

* Ruby >= 1.9 - use BOM to set encoding, then encode to UTF-8
* Ruby 1.8 - drop the UTF-8 BOM, ignore all others