Add unit tests for reading version info

* also strip BOM when it is present at start of file