Nbits fix

Add nbits reading fix: read as unsigned int instead of signed int. Copied from [this commit](https://github.com/andersonbrandon/ruby-imagespec/commit/d1747691b5cc2d61dae1fd81b38294b182eaabaf).