Added unit tests for bn_from_bin and bn_to_bin.