FileHelpers: Adds BOM support via default param

* Adds BOM support via default param.
  * Refixes #665 and #668.
* Code formatting and analysis fixes.