MAINT move decoder tests to _decode subdir
TST add tests for count_trans function
FIX enhance input validation

Fixes #3.