Made it possible to specify penalty parameters for search mode.

* Also fixed NPE where it always throws NPE when search mode is used due to null ViterbiBuilder.