test (bu$name): add tests for all utility functions

Also fixed a bug in the directive function which ignored namespace dashes