Doctest: Fix path issue for local test data

Use doctest.tesmod() `extraglobs` parameter to pass absolute data path to the doctest module. This works from both module directory or tests directory
Fix both inline and documentation doctests
Add test for decoder stack
Merge branch 'dev'