Add options hash so encoding may be specified.

Adds an options hash so that external encoding can be specified when reading a file. Also adds rspec coverage.