Fixed test file to make sure it works on OS X.
Pass RngState receiver as pointer

according to go style guide since struct contains a
pointer (which however in this case my not be mutating).
Implemented small changes according to style guide.